Fell in love with an old-timer: Music On Console

Posted on .

One aspect where Fedora is more inconvenient to use than Slackware is playing music. Specifically, playing MP3 files. I’m not sure about the legal status of software MP3 players. Wikipedia has a section in the MP3 article about it mentioning there are still pending patent issues that may be resolved this year. However, Slackware has been shipping MP3 decoding software like mpg321 and libmad for several years. Audacious, as shipped with Slackware, includes the MP3 plugin, for example. Fedora, on the other hand, doesn’t ship any software to play MP3s by default. I’m not sure Slackware’s legal status is solid in this regard but I’m not a lawyer, and having MP3 playing capabilities out-of-the-box is definitely handy.

In Fedora, as I stated a few times in the past, I like to build my multimedia toolchain by hand. This means, basically, that I build ffmpeg, mpv and a few other packages with my own SPEC files. Other people like the convenience of RPM Fusion, a repository providing additional packages that cannot be found in the official Fedora repositories. It’s definitely worth taking a look at it. If you use RPM Fusion, it’s easy to install a few packages here and there and give Audacious the capability of playing MP3 files, or having a few command-line tools available that can handle them.

But if you decide not to use RPM Fusion, adding MP3 support to Fedora can be a bit inconvenient. RPM Fusion gives you several options. The easiest one is by providing Audacious and GStreamer plugin packages. If you want to replicate that work you need to install libav instead of or in addition to ffmpeg and build a few plugins (note I don’t take any sides in the ffmpeg vs libav controversy and I’m simply used to installing and using ffmpeg because it seems better supported for the software I normally use).

In that situation, I decided to try to find a music player that could use ffmpeg directly and didn’t depend on a specific desktop environment to simplify my build chain. To my surprise, there aren’t many. Most of them use libav or ffmpeg indirectly through GStreamer, as mentioned above. Enter MOC: a simple client-server music player with an included curses interface. Super-simple to build and use. It uses ffmpeg directly and works amazingly from both a tty and a terminal emulator. The server part is handled automatically in most cases and allows music to continue playing while the client is closed. It supports playlists or playing music from a directory. 100% recommended.

Note if you do use RPM Fusion under Fedora, you can try MOC too without any hassles. RPM Fusion provides a MOC package.

comments powered by Disqus