As some of you might have read in Mark Kretschmann’s blog, we now have a fairly good phonon-vlc backend that already works better in many ways than other available backends. It is still in alpha stage, but we would love to have testers give it a try.

The instructions below are for a Kubuntu or Debian system, I did the installation on the latest Kubuntu 10.04 beta checkout as of Saturday, April 4th. I will give some additional commands for other distributions where those are needed.

DISCLAIMER: Please do not install this backend if you are not comfortable with alpha code and willing to test and report bugs. We currently do not give support for it. We also strongly suggest you test this with Amarok from git, since there were quite some changes applied to the Amarok code, too. See also the KDE git tutorial for those not familiar with it.

UPDATES: I changed the VLC installation instructions to make sure you install the 1.1 version instead of the git master branch which is the development version.

UPDATE 2: July 4th 2010: The VLC information is updated to reflect that all distros now ship VLC 1.1 (if they don’t, talk to them, they really should, it is much better and fixes a lot of bugs.

UPDATE 3: September 20th 2010: Development is quite fast paced for both VLC and the VLC backend, so there have been some updates: VLC 1.1.4 is now a requirement and there is an addition to the Cmake command for the VLC backend, to make sure it uses a stable phonon version: erase CMakeCache.txt in the build folder and run Cmake again, with the modifications below.

UPDATE 4: November 30th 2010: Updated the git checkout for VLC.

UPDATE 5: December 21st 2010: Phonon has moved the source repository to git now. Updated the git checkout for phonon-vlc.

UPDATE 6: January 7th 2010: You now need a newer Phonon build, updated the blog accordingly.

UPDATE 7: February 5th 2011: Please only use anongit to pull, see sections 2 and 3.

I assume you have the environment variables set as suggested in part 3 of the above mentioned HowTo for Amarok from git. We still need to add some more lines to make sure we get a proper debug output for the phonon-vlc backend:

Add the following lines to your $HOME/.bashrc:

export PHONON_VLC_DEBUG=3

export PHONON_DEBUG=1

1. Install the VLC 1.1 stable branch

Most distributions currently ship VLC 1.1.4, but for those who happen to run an earlier one it is still necessary to compile yourself, see the instructions below:

You can find the source code here: http://git.videolan.org/vlc. I use a system-wide installation, but the careful amongst you can do a local installation. The steps are the following:

use a local vlc directory, I use $HOME/kde/src/

git clone git://git.videolan.org/vlc/vlc-1.1.git

cd vlc

This will get you the latest stable branch, including all the latest fixes.

Now I am somewhat lazy, so I used the very handy build-dep command to find all the necessary dependencies for VLC. You can do this by activating the source repositories in your /etc/apt/sources.list, then type the following command:

sudo apt-get build-dep vlc

For OpenSuSE users, this would be:

sudo zypper si -d vlc

This will bring in almost all necessary dependencies, but the following did not show up, so I had to install those afterwards:

libxcb-shm0-dev

libxcb-xv0-dev

libx11-xcb-dev

To build VLC, you will also need the following packages:

autoconf

lua5.1

liblua5.1-0-dev

OK, lets build it then:

./bootstrap

./configure --prefix=/usr

don’t forget to change this prefix for a local installation, and of course do not run make install with sudo rights below.

make -j3 && sudo make install

There you are, you have a brand new VLC! For those using a local installation, don’t forget to remove the distro packages to avoid any conflicts.

2. Build a newer Phonon

Some dependencies changed in the new backend version and we want to have a newer Phonon build than 4.4.3 which is currently shipped by most distributions in KDE 4.6, Let’s start with that before we can build the backend.

Phonon is now located on git.kde.org.

git clone git://anongit.kde.org/phonon

cd phonon

mkdir build

cd build

I did a system-wide installation to override the default Phonon delivered with KDE. Here comes the cmake command:

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=debugfull $HOME/kde/src/phonon



All in one line, of course. The command

sudo make install

will build it and you have a new Phonon on your system 🙂

3. Build the phonon-vlc backend

The current code is located on git.kde.org. Keep in mind that this is still very much work in progress, so there will be changes to the code almost daily.

Again, use a new repository for this code, I suggest $HOME/kde/src/ as usual:

git clone git://anongit.kde.org/phonon-vlc

cd phonon-vlc

mkdir build

cd build

Everything is read to build now:

cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde/ \

-DCMAKE_INCLUDE_PATH=$HOME/kde/include/ \

-DCMAKE_LIBRARY_PATH=$HOME/kde/lib/ \

-DCMAKE_BUILD_TYPE=debugfull \

-DPHONON_VLC_NO_EXPERIMENTAL=true $HOME/kde/src/phonon-vlc/

all in one line, of course, don’t forget to change the -DCMAKE_INSTALL_PREFIX for a non local installation.

make -j3 && make install

the same warning applies for a non local build, do use sudo make install

We are almost there, now let’s activate this backend:

kbuildsycoca4 --noincremental

And now you can change your backend in the System Settings -> Multimedia -> Backend tab. Start Amarok and enjoy 🙂

Please help us improve this backend and report any bugs you might find here: http://bugs.kde.org/enter_bug.cgi?product=phonon, component “VLC backend”. Keep in mind that this is still work in progress, so make sure your bug report is really against the latest version. For those willing to give a hand and/or submit patches, please meet us in #phonon on irc.freenode.net or make a merge request for your patch.