Akademy ==~*

My badge at akademy
Yes I am.

So, Akademy 2012 is over. A huge thanks to everyone involved, it has been amazing. Met a lot of friends, made many new ones, attended really interesting talks about varied subjects, attended even more varied BoFs, hacked and partied. Even attended the start of the QtQuick workshop (but had to leave for the Phonon BoF before they started handing out N9s :P). A huge thanks also to the KDE e. V. so that I could attend (even without a paying job).

The most interesting results of Akademy are probably the plans for Phonon 5 (and the rest of the discussion about Phonon), the plans for KDE multimedia in general, and I finally managed to revive carewolf’s avkode project. Which is so interesting that it’ll get its own paragraphs.

avkode

Some of you may remember the aKode project from KDE 3 times, which was an audio playback framework made by Allan Sandfeld Jensen. What not so many people know is that he started working on a sibling during the KDE 4.0 times, which also supported video playback, with a corresponding Phonon backend. Unfortunately he got busy with Real Life™, and avkode was left alone in SVN for many, many years. Then along came a bored Sandsmark and first got it to build, updated it to not use outdated ffmpeg API, and rewrote most of the Phonon backend (it was written before the final version of Phonon was release, apparently, so it didn’t really match with how things are done nowadays). Then at Akademy Allan and I sat down and hacked on it a bit, to the point where I am now using it as my main Phonon backend (it seems to work well in JuK, Dragon, Amarok, file dialog previews, etc.).

Why?

I started looking into creating a tiny, minimal Phonon backend, for many reasons; firstly we are now working towards Phonon 5, so I wanted to get a fresh look on how the backend/frontend integration works, and I also got a bit tired of working around bugs in the frameworks Phonon are using. Making a backend that uses ffmpeg/xv/alsa-lib/etc. directly has been something I’ve wanted to look into for a long while now. And when I finally sat down, and looked at aKode for inspiration, I found that Allan had already done most of the work needed. So now we have a pretty minimal Phonon backend (it only depends on Qt, ffmpeg, libxv and alsa-lib), though it doesn’t support most of the advanced features available in other backends (like painting on anything other than the normal VideoWidget).

For now the code is at http://quickgit.kde.org/index.php?p=scratch/sandsmark/avkode.git&a=summary

It is still kind of rough around the edges, and will probably stay like that for a while, as I plan on working more on VLC (I have plans for a KIO access module for example, so we can avoid the ugly platform plugin kio hackery with phonon-vlc). I give no guarantees for it (I’m not even sure it builds on many major distributions at all, since they apparently have started shipping the libav fork instead of proper ffmpeg). And it has no website, logo or documentation for now, though I did put up a PKGBUILD for Arch in the AUR.

Another thing that you’ll notice with avkode is that when using it playback progress bars should be smooth, since it has spatial tick emission (not properly, it assumes that all progress bars are 1024 pixels for now). Spatial tick emission is a fancy name I made up on the spot, where instead of always emitting a progress tick at fixed intervals it emits a fixed amount of ticks per media object, independent of how long it is, so that an application can get pixel-perfect progress bars.

About these ads

8 thoughts on “Akademy ==~*

  1. Thanks for the PKGBUILD, it seems to be working nicely.

    While reading this I initially that distros would never ship this backend over the GStreamer backend (since Gnome depends on GStreamer), I think this is a wonderful idea. No matter if a users needs VLC or GStreamer tools like ffmpeg are already installed.

    I hope you can add gapless playback (since many Amarok users seem to want that), a visualizer, and PulseAudio support and I’m sure many KDE-centric distributions will ship it.

    Also, that’s some odd articles you linked there. Makes me think that libav needs to go away for good. I understand why Debian uses it (since according to the article Debian’s libav maintainer is spreading lies to the Debian community) but why do other distros ship it? Why does libav even ship a “ffmpeg” binary in the first place? Can KDE just hard depend on ffmpeg, since it is still has a vibrant developing community?

    1. I just noticed that videos are not playing properly with this Phonon backend. All I get is the audio from the video. I use Bangarang on Chakra Linux by the way. Most of my videos are DVD’s ripped with Handbrake at default settings but I have a few videos from a phone camera that all play in Bangarang with the GStreamer backend. I’m pretty certain that Chakra ships ffmpeg instead of libav.

  2. Why not just drop Phonon for KDE 5 and adopt gstreamer?

    I remember this came up when Phonon was initially proposed, and the main reason was “we don’t know if gstreamer is the way to go, and we don’t want another aRts”.
    And then years of painful backends followed, where at one time at most once was working correctly. Trolltech/Qt Software/Nokia/Microsoft stopped maintaining Phonon, and the windows and osx ones were left to bitrot.

    Recently, this has been solved, at least for linux, but I would like to ask: If you’re planning on starting again, why not consider gstreamer again?
    I’ve heard that gstreamer is not very easy to get working on windows/osx, but there’s no xv/alsalib there, and ffmpeg isn’t shipped as part of the OS either.

    1. Same reason I don’t work on phonon-gstreamer; for me it’s way too complex and the glib-based API gives me headaches and hand cramps (with its endless boilerplate and macro magic).

      And no, it’s decidedly non-trivial to get working on windows, that’s why Phonon-VLC is the recommended / mostly used backend on windows.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s