Solving a Dragon video player problem

When Ubuntu Lucid 10.04 LTS came out recently I finally decided to
give KDE a try and installed Kubuntu.

One of the nice features for the newcomer (and probably everybody else
who can use a keyboard and is tired of overly long menu choices) is
the search field in the “K” menu. They call it “Kickoff Application
Launcher”, windows users would call it the “Start” menu. If you type a
few characters it will show all possible matches. The text doesn’t
need to match the program name, but will also be found in the program
description. Typing “vid” will reveal that there is a video player
called dragon.

That’s all nice, but unfortunately dragon did not play many of my
video clips. Well actually it played the video, but the sound was an
nearly unrecognizable noise.

Googling for the problem produced only one possible hit at, but the
solution suggested there did definitely not help.

After investigating many things I came to the conclusions

  • many multimedia formats did actually work fine. But clips using the
    FLV container format and an AAC audio stream didn’t. And because
    this combination is widely used on Youtube, they also happened to be
    in my collection.

  • it’s not a hardware problem, because when I boot the same machine to
    Ubuntu, totem videoplayer can play the sound without problems. The
    AAC audio codec is in libfaad and actually the shared library’s MD5
    checksum is identical in both my working Ubuntu installation and an
    the broken Kubuntu installation

So what next? Unfortunately I had no clue about dragon’s
architecture. So I decided to take an ltrace and see what it does,
while playing the undesired noise. (Interesting enough ltrace comes with
Kubuntu, no need to install it.)

ltrace -C -o dragon.ltrace dragon

To my surprise there was nothing related to codecs or pulseaudio in
the trace. (Is there some limitation that ltrace doesn’t show calls
from one shared library to another???) The few calls clearly related
to multimedia were all in phonon namespace.

Google lead me to OK, phonon is the top-level
multimedia framework in KDE. And it needs a backend to really play
media. Several backends are supported, but browsing the list of
installed packages reveals that xine-lib is used in Kubuntu.

xine-lib is at The newest version is, but Kubuntu Lucid uses The 1.1.18 release notes
mention promising changes indeed:

* Flash audio bug fixes, mostly concerning AAC.

Ok. So let’s just download and build lib-xine But ./configure
is not a pleasant reading for the newcomer. There is a plethora
of configuration options and which ones should I use the get a version
that just works with my existing system???

Well, remember that Kubuntu is Debian based and (re-)building a
package is always the same command in Debian. So if I’d rebuild the
existing based debian package, copy paste the configuration
to the tarball things should be easy without really
understanding the details.

So here we go:

apt-get source libxine1
cd xine-lib-1.1.17
dpkg-buildpackage -b -rfakeroot

(Although I have done some building on this machine before and already
had quite some development packages installed I needed to install about
100 packages more, before building succeeded. However, all dependencies
were declared correctly, so I just needed to read the complaints about
missing packages. No intellectual work required here.)

By running ./config.status -V we can see the configuration chosen by
the Debian package.

So I copied that, just changed the installation prefix (because I prefer
to have tests with unknown outcome under my home directory clearly
separated from the installed software)

./configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' \
'--prefix=/home/usrmisc/try/xine-lib/install' \
'--with-external-libmad' '--with-external-a52dec' \
'--with-external-libdts' '--with-external-ffmpeg' \
'--with-external-libmpcdec' '--enable-ipv6' '--with-jack' \
'--with-pulseaudio' '--with-libflac' '--with-wavpack' \
'--with-freetype' '--disable-vidix' '--enable-directfb' \
'--disable-nosefart' \
'LIBMODPLUG_LIBS=-lmodplug' 'CFLAGS=-g -O2 -g' \
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' \
'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='

And now test it by overriding the system’s library path:

LD_LIBRARY_PATH=/home/usrmisc/try/xine-lib/install/lib dragon

Great! It just works. Problem was already fixed in the new version.

P.S. The next step is to find out how to get the new version of
lib-xine into Kubuntu. Ubuntu uses launchpad, but bugs for KDE
components are reported to KDE’s own bugzilla. But there is no bug in
the current version of the KDE application, just Kubuntu has an older
buggy one. How is that handled??? Let’s see whether understanding the
bureaucracy is quicker than solving the technical problem in this


About usrmisc

I'm a software guy and intend to write down my own miscellaneous learnings here instead of on some papers, which I don't find again. Let's see how that goes. I work mainly with Linux.
This entry was posted in diary, troubleshooting and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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