Useful Multimedia Programs for FreeBSD

In this tutorial, I will introduce you to some useful audio and video programs.


Asunder

Asunder is a graphical audio CD ripper and encoder. We can use it to save songs fom an audio CD as WAV, MP3, OGG and/or FLAC.

It offers the following functions:

  • Can save audio tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, Musepack, AAC and Monkey's audio files.
  • Uses CDDB to name and tag each track
  • Creates M3U playlists
  • Can encode to multiple formats in one session
  • Simultaneous ripping and encoding
  • Each track can be from a different artist.

We can easily install it with the following command.

shell: doas pkg install asunder
asunder

Quod Libet

Quod Libet is a GTK+-based audio player written in Python and using the tagging library Mutagen. We can create playlists based on regular expressions (don't worry, regular searches work too). With Quod Libet we can view and edit all the tags we want in the file, for all the file formats it supports.

Unlike other programs, Quod Libet scales to libraries with tens of thousands of songs. It also supports most of the features you'd expect from a modern media player: Unicode support, advanced tag editing, replay gain, podcasts and Internet radio, album art support, and all major audio formats.

We can install it easily:

shell: doas pkg install py38-quodlibet

It is recommended to install the following ports to play additional audio formats under Quod Libet:

For some Quod Libet plug-ins additional ports have to be installed:

We will install all ports at once in one go

shell: doas pkg install gstreamer1-plugins-faad gstreamer1-plugins-flac gstreamer1-plugins-mpg123 gstreamer1-plugins-ogg gstreamer1-plugins-speex gstreamer1-plugins-vorbis gstreamer1-plugins-wavpack gstreamer1-libav py38-musicbrainzngs py38-pyinotify webkit2-gtk3
Quod Libet Quod Libet Tag Editor

mpv

As a simple video player I can recommend mpv.

mpv is based on the projects MPlayer and mplayer2, which it improves a lot. It supports a wide range of video file formats, audio and video codecs and subtitle types. Special input URL types are available to accept input from a variety of sources other than hard disk files. A variety of different video and audio output methods are supported, depending on the platform.

Other features include:

  • Powerful scripting capabilities can let the player do almost anything. There is a large selection of user scripts in the mpv wiki.

  • While mpv strives for minimalism and does not provide a true graphical user interface, it does have a small controller above the video for basic control.

  • mpv has OpenGL -, Vulkan- and D3D11-based video output, which offers many features appreciated by video enthusiasts, such as video scaling with common high-quality algorithms, color management, frame timing, interpolation, HDR and more.

  • mpv can use most hardware decoding APIs on all platforms. Hardware decoding can be enabled at runtime if needed.

We can install mpv with the following command:

shell: doas pkg install mpv
mpv

Celluloid

Celluloid (formerly GNOME MPV) is a simple GTK+ frontend for mpv. It is easy to use while providing a high level of configurability.

We install it with:

shell: doas pkg install celluloid
mpv

Subsonic compatible clients

If you followed my Airsonic or Navidrome guide I will show you 2 compatible clients you can use.

STMP

STMP is a terminal client for sonic music servers. Inspired by ncmpcpp.

It offers the following features:

  • browse by folder
  • queue songs and albums
  • volume control

We can install it as follows:

shell: doas pkg install stmp

Then we create the configuration file.

shell: mkdir ~/.config/stmp

shell: nano ~/.config/stmp/stmp.toml =>

[auth]
username = 'your username'
password = 'your password'

[server]
host = 'https://music.(domain)'
mpv
shortcutfunctionality
1folder view
2queue view
enterplay song (deletes the current queue)
d / deleteRemoves the currently selected song from the queue
Dremoves all songs from the queue
aAdds an album or track to the queue
pPlay or pause
- / =Decreases the volume / increases the volume

Sublime Music

Sublime Music is a native GTK client with numerous features for Subsonic-compatible servers.

Sublime Music offers the following features:

  • it connects to any server that has implemented the Subsonic API, including Airsonic, Gonic and Navidrome. We can also configure multiple servers and switch between them.

  • we can download our songs for offline listening. Sublime Music also provides an offline mode to prevent it from making network requests, which can be useful if we have a toll connection.

  • we control Sublime Music via playerctl, KDE Connect and many common desktop environments. Sublime Music provides a common MPRIS interface that works with many clients.

  • we can stream music to Google Chromecast and Google Home devices on the same network. You can even use "Hey Google" to pause and play the music during the transfer.

First we need to install py38-pip.

root: pkg install py38-pip

Then we can install Sublime Music with pip.

pip-3.8 install sublime-music
mpv

spotify-qt

spotify-qt is an unofficial Spotify client that uses Qt as a simpler, lighter alternative to the official client, inspired by spotify-tui. Similar to spotify-tui, we need an actual Spotify client, for example spotifyd, which can be configured in the app. As with other clients, Spotify Premium is required to control music playback.

We can install spotifyd and spotify-qt as follows:

shell: doas pkg install spotifyd spotify-qt

The first time we start spotify-qt, we are told that we need to register spotify-qt on Spotify's developer site first.

We log in at https://developer.spotify.com/dashboard/applications and then create a new app. We then enter the app name. For the redirect URL, we enter http://localhost:8888.

And then click complete and thereafter, it will then show the required client ID and client secret.

We then enter both in spotify-qt.

In the settings, we change to the Spotify tab.

Spotify-qt Settings

In the path field, we enter “/usr/local/bin/spotifyd” and select “Start with App” and “Always start”.

Spotify-qt settings 2

Under Spotiy Configuration, we uncheck “use global config”.

Finally, we create a new configuration file under .config/spotifyd.

shell: nano .config/spotifyd/spotifyd.conf =>

[global]
# Your Spotify account name.
username = "Your username"

# Your Spotify account password.
password = "Your password"

# The audio backend used to play your music. To get
# a list of possible backends, run `spotifyd --help`.
backend = "portaudio"

# The displayed device type in Spotify clients.
# Can be unknown, computer, tablet, smartphone, speaker, t_v,
# a_v_r (audio/video receiver), s_t_b (set-top box), and audio_dongle.
device_type = "speaker"
Spotify-qt