xine-vdpau – the first contact

[UPDATE] I’ve managed now to make xine-ui (xine player) to use the proper plugin libraries (1.25) and the output devices are also listed now, see here:

/usr/local/bin/xine --list-plugins | grep vdpau
vdpau, dxr3, aadxr3, xv, SyncFB, opengl, raw, xshm, aa, caca, none, sdl,
dxr3-mpeg2, vdpau_mpeg12, gdkpixbuf, vdpau_h264, mpeg2, realvdec,

Starting the sample code (with the modified ~/.xine/config-> engine.buffers.video_num_frames:22) results in this output, but still no video. Xine pops up with a black window, and it remains being black until I press Ctrl+c on the command line.

vo_vdpau: vdpau_alloc_frame
vdpau_set_property: property=4, value=900
        mrl: '../xine-lib-vdpau/xine-vdpau/astrahd+.m2t',
        sub 'NONE',
        start_pos 0, start_time 0, av_offset 0, spu_offset 0.
xine: found input plugin  : file input plugin
ebml: Invalid EBML length size (0x0) at position 3
ebml: invalid master element
xine: found demuxer plugin: MPEG Transport Stream demuxer
av_offset=0 pts
spu_offset=0 pts
audio_oss_out: audio rate : 48000 requested, 48000 provided by device
audio_oss_out: 2 channels output
Create decoder: vdp_device: 1, profile: 8, res: 1920x1080
vdpau_h264: Decoder failure: An invalid handle value was provided

In order to make this use the right libraries at all, I’ve removed and deinstalled all xine and xine-lib packages, what have been on my hard disk. The proper solution for compilation would be something like this: ./configure XINE_LIBS=-L/usr/local/lib XINE_CFLAGS=-I/usr/local/include , but my installation was messed up that much, so I had to remove the libs from /usr/lib/xine and /usr/local/lib/xine manually. Also the libs, which were in /usr/lib/xine-* I deleted manually. Having the libs installed I ran into linker errors, like this one:

error in file odk.c : Undefined symbol xine_get_error

Pretty simple. Just this here:

xine my_file_name_here.m2t

I’ve finally got it working, (not VDR yet) but it turned out, that enabled TwinView prevent my from seeing a video. The time I turned it off, the sample file stated to play.

Next step is to make VDR work. I know, it must work, since I’ve already saw a video on YouTube, where the VDR was performing with xine-vdpau. See here:

I’ve asked the author if he can tell me his little secret about the config string for the client and server part.

[UPDATE]The author (YouTube nick: antii2k) told me to use the xineliboutput plugin and start the server like this:

/usr/local/bin/vdr      --lirc=/dev/lircd
                        -L /usr/local/src/VDR/PLUGINS/lib
                        -c /etc/vdr/
                        -v /var/lib/video.00/
                        -P'xineliboutput --local=none --remote=37890 --primary parameters' 

The server isn’t started with xine, because there is no yet. We have to use the xineliboutput on server’s side, but we can’t use vdr-sxfe as the client’s front-end, because there’s only one ancient patch(don’t try) available, which pretty sure won’t work.

vdr-sxfe is told to work out of the box (see comment section). It’s not working for me, but that doesn’t mean, it’s not working at all, and the statement above (patching needed) is most likely wrong. Thanks for this information.

So we depend on the client side on the xine user interface again:

xine --verbose=2 "xvdr+tcp:// cache;demux:mpeg_block"

Well – finally it worked for me also with VDR – err, sort of – it crashed all the way. I couldn’t hardly switch onto another channel, or had freezes. Starting in fullscreen (-f) didn’t work either.

I’m on a x86_64 system, and maybe that’s why it doesn’t behave like in the YouTube video from antii2k. Anyway. I think it’s clear that this is all quite alpha and more or less just a feasibility test. Nevertheless is was quite impressive to see the CPU usage on my Q6600 (quad-core). It was between 6 to 10%, but no equally balanced over the four cores.

I see it as a lesson about how to set up an VDR with vdpau support in combination with xine and/or xineliboutput, so if it gets stable, I can go straight forward and install it with my little documentation here.

11 thoughts on “xine-vdpau – the first contact

  1. vdr-sxfe is usable out of the box without any problems. No need for patches.

  2. ./ –prefix=/usr CPPFLAGS=”-I/usr/local/src/xine-vdpau/src/libffmpeg -I/usr/local/src/xine-vdpau/src/libffmpeg/libavutil -I/usr/local/src/xine-vdpau/src/libffmpeg/libavcodec -I/usr/local/src/xine-vdpau/src/libffmpeg/libavcodec/libpostproc”

    ./configure: line 2000: syntax error near unexpected token `”xine-lib”,’
    ./configure: line 2000: `AM_INIT_AUTOMAKE(“xine-lib”, $SPEC_VERSION)’

    can you help me ?

  3. @Bluray
    your “” have to be in
    or you have to update the CPPFLAGS accordingly to the location where your xine-vdpau currently on your hdd is.
    But that’s only a guess.

  4. I’m using Ubuntu 8.10 64bit, I spent the folder “xine-vdpau” to” / usr / local / src” but had to use sudo to run. /, because the folder where is the xine-vdpau is root
    /usr/share/automake-1.7/am/ AMDEP does not appear in AM_CONDITIONAL
    + Running autoconf: done.
    + Running ‘configure –prefix=/usr CPPFLAGS=-I/usr/local/src/xine-vdpau/src/libffmpeg -I/usr/local/src/xine-vdpau/src/libffmpeg/libavutil -I/usr/local/src/xine-vdpau/src/libffmpeg/libavcodec -I/usr/local/src/xine-vdpau/src/libffmpeg/libavcodec/libpostproc’:
    ./configure: line 2000: syntax error near unexpected token `”xine-lib”,’
    ./configure: line 2000: `AM_INIT_AUTOMAKE(“xine-lib”, $SPEC_VERSION)’

    gave the same thing

  5. @Bluray
    Hmm, difficult to diagnose this, but here are my 2cent:

    1st, remove your xine installation:

    apt-get remove libxine1 libxine1-bin libxine1-dbg

    The following packages will be REMOVED:
    gxine gxineplugin libxine1 libxine1-bin libxine1-console libxine1-ffmpeg libxine1-misc-plugins libxine1-plugins
    libxine1-x libxine1-xvdr

    2nd, install at least these pachages:

    apt-get install autoconf libtool automake autoconf pkg-config gettext subversion
    apt-get install liba52-0.7.4-dev libmp3lame-dev libvorbis-dev zlib1g-dev libpng12-dev libx11-dev libxv-dev libasound2-dev libogg-dev
    apt-get install libxvidcore4-dev libtheora-dev libgsm1-dev libfaac-dev libfaad-dev

    3rd, you can also check the dependencies by

    apt-get build-dep xine-lib --dry-run

    4th. I'm using automake1.9, but this could be irrelevant.

    5th, use Google, if all above fails. I've read something about running 'aclocal' before compilation or stuff.


    PS: using /usr/local/src isn't really a good idea of mine, that's true. I've just wanted you to check the CPPFLAGS against your installed xine-vdpau path, that's all.

  6. How did you get your xine-lib-1.2 libraries linked properly so the vdpau got built?

    I can start xine with :
    xine –verbose=2 -V vdpau -A alsa –post vdr_video –post 001.vdr
    but it plays in xv “video_out_xv”

    I can even start with xine –verbose=2 -V biggirlsblouse -A alsa –post
    vdr_video –post vdr_audio –post upmix_mono 001.vdr
    and it still plays in xv with no errors.

    I’m using xine-lib-1.2 and patching with xine-lib-1.2-vdpau-r286.diff which
    was configured with:
    ./ –with-vdpau –enable-debug –disable-optimizations –with-mpc=no

    then using xine-ui xine-ui-cvs-20090617220000 built with
    ./ –enable-vdr-keys –disable-lirc

    My only library plugins are now xine-lib-1.2:
    ldconfig -p | grep xine (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/

    ls -l /usr/local/lib/libxine*
    -rwxr-xr-x 1 root root 825 2010-01-09 11:59 /usr/local/lib/
    lrwxrwxrwx 1 root root 16 2010-01-09 11:59 /usr/local/lib/ ->
    lrwxrwxrwx 1 root root 16 2010-01-09 11:59
    /usr/local/lib/ ->
    -rwxr-xr-x 1 root root 1118042 2010-01-09 11:59

    Kernel is:

    nvidia drivers are:

    Video card is:
    00:0d.0 VGA compatible controller: nVidia Corporation GeForce 6150SE nForce
    430 (rev a2) (prog-if 00 [VGA controller])
    Subsystem: Giga-byte Technology Device d000
    Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 22
    Memory at f2000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f3000000 (64-bit, non-prefetchable) [size=16M]
    [virtual] Expansion ROM at 50000000 [disabled] [size=128K]
    Capabilities: [48] Power Management version 2
    Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+
    Count=1/1 Enable-
    Kernel driver in use: nvidia
    Kernel modules: nvidia, nvidiafb

    Any ideas?? What am I doing wrong?

  7. Oh yeah, I’m also getting this…

    Everything appears to compile fine, but if I do:

    xine –list-plugins | grep vdpau

    I get nothing.


  8. @Simon

    I’m not building xine myself anymore, since it’s – and you know it now also – a real PITA. I’m using the “the-vdr-team” PPA repo for Ubuntu (Karmic Koala). This blog article is quite old, regarding the rapid development going on in this sector.
    But I guess you suffer the same, I suffered from the first time I’ve tried to build libxine on my own. Thas was, that I had to get rid off the libxine-1.x somehow. I was always linking against the old plugin libs, and there is no vdpau plugin.
    Run “xine –verpobe –no-logo” and be sure the plugins are 2.x and not 1.x or something. And check out the second page of this article carefully, especially where it comes to versions (2.0 and 1.x).

    Hope I could help.


Comments are closed.