Thursday, 12 November 2009

KDE4 multimedia in Slackware

Multimedia has always been a bit of a pain in Linux distros. It's riddled with patents and other restrictions, which free-software purists dislike. So even simple things like playing mp3 files often produce a lot of hassle. KDE3 had its own sound server, called arts, which in recent years has been unmaintained and generally unsatisfactory. KDE4 replaced this with a new multimedia framework called Phonon. This can work with different backends, of which the usual ones are gstreamer and xine.

In both Debian and Slackware, gstreamer is the default. When using xine in kde3, I used the Windows codecs from mplayer, but gstreamer uses its own plugins, of which there are several packages: gst-plugins-base includes quality open-source codecs like ogg and theora, gst-plugins-good adds others, including containers like flv and avi. The mpg codecs are in gst-plugins-ugly, i.e. those which are good-quality but have license/patent issues. Debian includes all these plugins somewhere in its repos, but Slack only has base and good, so you cannot use mp3 files with gstreamer in the standard Slack distro. Fortunately, ugly is available on which also includes the various libraries needed which are also not in standard Slack. Install all those and you can then listen to mp3 files in KDE programs like Juk.

Mind you, Slack does include mpg321 which enables you to play mp3 files on the command line, so you could set up a file association in kde to use mpg321 to play mp3 files.

Another of those areas where Linux distros create a lot of hassle for something that should be simple.

No comments:

Post a Comment