Want to test the phonon-vlc backend? Here you go :)

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:


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:

    ./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:

    -DCMAKE_INCLUDE_PATH=$HOME/kde/include/ \
    -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.

    Be Sociable, Share!

    flattr this!

    This entry was posted in Amarok, Free Software, FSFE, Git, KDE, Kubuntu, Ubuntu and tagged , , , , , , . Bookmark the permalink.

    44 Responses to Want to test the phonon-vlc backend? Here you go :)

    1. Markus says:

      Why so complicated? Just create a Build Service repo.

    2. Vadim P. says:

      Checked both posts, both don’t say *why* it works better (well, the linked one refers to it working better than xine only).

      • Why? Because it’s made of Pure Awesome (TM).

        More seriously: I think my blog explained this pretty well. Also check some of the comments, they explain some further things.

      • myriam says:

        My experience shows it works better than the xine backend in the following:

        - the sound is much louder. For some obscure reason the xine backend caused the sound volume to be cut down. We have not been aware of this before we actually tested this backend.

        - the stereo distribution is much, much better. Test it, you will see :)

        There are many more enhancements, of course also some “drawbacks” like there is no equalizer for the moment, but remember, this is alpha software and we are working on it :)

        • blaster999 says:

          >- the sound is much louder. For some obscure reason the xine backend caused the sound volume to be cut down

          That might be because Xine supports ReplayGain (although I have no idea wether VLC supports it, so it’s just a guess).

          • We wondered about this too, but as far as I can tell this is unrelated to ReplayGain.

            Even without ReplayGain, xine is (far) less loud, and also doesn’t sound as crisp as VLC does.

    3. afiestas says:

      Working like a charm, nice work!

    4. Ferahgo says:

      Hmm..odd. Compile && make went fine, files are there, kbuildsycoca run, but I can’t select the backend in System Settings, it simply isn’t there.
      I have the sneaking suspicion there is something to have gone wrong at VLC compile. My libvlc.so is but 90,0 KiB of size – would this not need to be quite bigger? How big is yours?

      • Please note that there was a typo in the blog, which Myriam has just fixed. It said one should install into “$HOME/usr”, which was wrong.

        That might be related to your problems, or not :)

        • Ferahgo says:

          Well the problem was more that I installed phonon-vlc in /usr, which put the files in
          “/usr/local/share/kde4/services/phononbackends” and
          “/usr/local/lib/kde4/plugins/phonon_backend/” respectively, where kbuildsycoca could not find them.
          I put them into
          “/usr/share/kde4/services/phononbackends” and “/usr/lib/kde4/plugins/phonon_backend/”, reran kbuildsycoca and all is nice now :)

    5. Ferahgo says:

      Nevermind. Works now..Awesome :)

    6. illissius says:

      I installed this yesterday and it works without a hitch. I was pretty surprised, actually, like, how can you tell it’s really using VLC? :)

      The only issue I had is when I first selected VLC as backend, Amarok popped up a dialog saying “could not load plugin ‘VLC’ for application Amarok” or somesuch and it didn’t work, but after I restarted Amarok everything was fine. (For the record, this might also be an improvement; in the past when I switched backends Amarok sometimes responded by crashing.)

      • Yes, the crash when switching backends is a known issue, we’ll try to fix that.

        PS: Phonon-Xine can’t handle this either. It doesn’t crash, but won’t play anything…

    7. DiaZ says:

      Why do you people only talk about xine backend and th vlc???
      And what about the gstreamer backend? Is it good or is it evolving?
      And about mplayer backend? No news. Is it planned at all?

      Sorry but if the future is vlc than goodbye kde, i really don’t like vlc altough i love mplayer.. weird hein? xD

      • leo says:

        sorry. your irrational fear of high quality open source cross-platform frameworks in lieu of mostly linux-only gstreamer does not make sense. (likewise with mplayer–it’s not even a library!)

    8. Pingback: uberVU - social comments

    9. d2kx says:

      I am very interested in trying phonon-vlc, so this post came just at the right time. Thank you!

    10. hefeweiz3n says:

      Thanks for the Blogpost. I have to agree: It works like a charm. Playback is much smoother, more “crispy” as you put it and transition from one track to the next in Amarok is also much better, nice work!

      Building on Archlinux is even more straightforward: Just install vlc-git and phonon-vlc-git from Arch User Repository, put the two lines in the .bashrc and run kbuildsycoca4: Done :D

    11. Phobeus says:

      The build process is failing here on Fedora 12. Any one a good idea, what might be the reason for it?

      Here does currently a KDE 4.4.1, VLC is 1.0.5.

    12. Arnaud Vallat says:


      it’s nice to have a vlc backend which is enough stable to use, great jobs and thanks for it!

      I have a question, is there a plan to write a QGraphicsItem for the video output ?


      • myriam says:

        I think that is something you should ask the Phonon developers. You can find them in #phonon on irc.freenode.net

    13. peewen says:

      grazie, funziona alla grande molto meglio di xine

      • myriam says:

        Ti prego! Vado subito dire agli altri della Phonon che hanno svilupato il backend che ti piace :)

        • pepedopolous says:

          Hey. I build Amarok from source following Mark’s info. That’s all fine.

          Built vlc but then no luck with phonon-vlc- it could not find libvlc!

          Tried to use cmake gui to point to libvlc as listed by locate command but no luck.

          Guess I don’t understand how to change the prefixes properly! I wanna do just local installation like amarok to avoid borking my system!

          • pepedopolous says:

            he he. Chromium says fsfe certificate’s not trusted!

          • I personally used this line for building it (adjust the paths as needed):

            cmake -DCMAKE_INSTALL_PREFIX=”/home/mark/kde/” -DCMAKE_INCLUDE_PATH=”/home/mark/kde/include/” -DCMAKE_LIBRARY_PATH=”/home/mark/kde/lib/” /home/mark/kde/src/vlc/bindings/phonon-vlc/

            PS: Also remember that you have to delete CMakeCache.txt after doing any changes.

          • myriam says:

            Well, if you follow the above instructions you will make a local installation. Did you follow the Amarok HowTo I mention at the start? I guess you have some environment variable not set correctly. Read again :)
            As for the certificate, it is self-signed by the FSFE and not by a commercial entity, hence not recognized by Chromium. This happens for all websites that use other certificates than the commercial ones. Blame Chromium :)

    14. pepedopolous says:

      cmake -DCMAKE_INSTALL_PREFIX=”$HOME/kde/” -DCMAKE_INCLUDE_PATH=”$HOME/kde/include/” -DCMAKE_LIBRARY_PATH=”$HOME/kde/lib/” -DCMAKE_BUILD_TYPE=debugfull $HOME/kde/src/phonon-vlc/

      built all 3 programs from scratch and the sound rocks (loudly!) (never mind the equaliser!)

      Somehow, cmake treated each ” as a directory e.g /”/home/kde/”/

      So I changed it to exact path for my home dir. Thanks for help

    15. Valorie says:

      Myriam, everything worked correctly for me except the quote marks in the cmake command. They are ” (fancy quotes) instead of ” (plain quotes). I ended up with the crazy path /home/valorie/kde/src/phonon-vlc/build/”/home/valorie/kde/”/lib/kde4/plugins/phonon_backend/ the first time, because of that!

    16. Andre says:

      Doesn’t work for me. VLC, Amarok & Phonon-VLC from Git all build and install just fine. The VLC Backend is also listed in systemsettings after the install. However, everytime I start amarok, or if I hover a media file in Dolphin, or if KNotify tries to play a sound, I get the message: “Unable to use the VLC Multimedia Backend: Could not find plugin ‘VLC’ for application ‘knotify’”. Or amarok, or Dolphin respectively.
      Paths look fine, though:

      gemuend@lithium:~> echo $KDEDIR
      gemuend@lithium:~> echo $KDEDIRS
      gemuend@lithium:~> ls /home/gemuend/kde4/lib/kde4/plugins/phonon_backend/
      gemuend@lithium:~> echo $PATH

    17. taurnil says:

      That’s pretty slick. Works fine here but haven’t tried it with amarok-git. Stereo separation seems wider and the sound levels seem higher than with the xine plugin.

      There were some of these warnings during the make;

      /usr/src/phonon-vlc/vlc/vlcmediaobject.cpp:264: warning: ‘int libvlc_video_get_width(libvlc_media_player_t*)’ is deprecated (declared at /usr/include/vlc/libvlc_media_player.h:608)
      /usr/src/phonon-vlc/vlc/vlcmediaobject.cpp:264: warning: ‘int libvlc_video_get_width(libvlc_media_player_t*)’ is deprecated (declared at /usr/include/vlc/libvlc_media_player.h:608)
      /usr/src/phonon-vlc/vlc/vlcmediaobject.cpp:267: warning: ‘int libvlc_video_get_height(libvlc_media_player_t*)’ is deprecated (declared at /usr/include/vlc/libvlc_media_player.h:598)
      /usr/src/phonon-vlc/vlc/vlcmediaobject.cpp:267: warning: ‘int libvlc_video_get_height(libvlc_media_player_t*)’ is deprecated (declared at /usr/include/vlc/libvlc_media_player.h:598)

      • myriam says:

        Compiler warnings are what they are: just warnings, not errors. You can safely ignore those, they are only relevant to developers, and only to a certain extend.

        • taurnil says:

          Yes I am aware they are just warnings. Just pointing out the use of a deprecated header.

    18. Astreek says:

      As this how to is tested on Kubuntu, could you make a PPA for vlc-git and phonon-vlc-git? :)

      • myriam says:

        This wouldn’t make much sense, since the vlc-backend is alpha software, and testers need to update frequently (at least daily with the current work rhythm of the developers, sometimes even more frequently). Knowing that the build servers are currently under a quite heavy load, since there is a planned release at the end of the month, this would simply not be fast enough for updates.

        Keep in mind that my instructions are by no means targeted at common users but towards testers who are comfortable with unstable software testing. Once you have installed it, you only make incremental builds anyway, and that is much faster than waiting for a PPA build-server to have new code.

    19. Cyberwizzard says:

      Instructions for Gentoo based on vlc-9999 and the git version of phonon-vlc: http://www.cyberwizzard.nl/site/how-tos/161-new-phonon-vlc-backend-for-kde-4.html

    20. Mike says:

      by testing the simpleplayer from sandsmark i get an error

      symbol lookup error: /usr/local/lib/kde4/plugins/phonon_backend/phonon_vlc.so: undefined symbol: _ZN6Phonon12PulseSupport6enableEb

      whats wrong?

      • myriam says:

        Please do not address this to my blog, I do not intend to use it as a support media for building problems :)

        Please ask in #phonon on irc.freenode.net or make a bug report as mentioned above.

    21. hefeweiz3n says:

      The “git checkout -b 1.1 –track origin/1.1.0-bugfix” doesn’t work for me, git always complains:
      “fatal: git checkout: updating paths is incompatible with switching branches.
      Did you intend to checkout ‘origin/1.1.0-bugfix’ which can not be resolved as commit?”

      I wonder if just using “git checkout -b 1.1″ is enough or is the last part really needed?

      • hefeweiz3n says:

        Found my Problem, it was the arch pkgbuild that screwed this up. It cloned the git-repo locally and the new one wasn’t aware of the branches somehow.

        Sorry for all the fuzz.