Author Topic: play HD video on slow hardware via VDPAU...  (Read 35717 times)

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
play HD video on slow hardware via VDPAU...
« on: March 16, 2009, 12:36:09 am »
Hi, if you haven't seen some previous threads that this will be a nice surprise for you. If you have issues playing HD video because you have too slow CPU there is a way to accelerate and offload the task of decoding HD video to graphics card (it has to be NVidia chip). This method is know as VDPAU.

You also need MPlayer with appropriate patch and latest NVidia 180.xx drivers.

I tried this compile guide:
http://blog.avirtualhome.com/2009/02/10/compile-mplayer-with-vdpau-support-on-ubuntu/

But still after compiling MPlayer I have no support for VDPAU :(

Here is how I tried it:
1st step: Install latest NVidia nv driver (this isn't covered by this guide)

2nd step compile mplayer with support for VDPAU:
wget ftp://download.nvidia.com/XFree86/vdpau/mplayer-vdpau-3532130.tar.bz2
tar xvjf mplayer-vdpau-3532130.tar.bz2
cd mplayer-vdpau-3532130/
./checkout-patch-build.sh
cp mplayer-vdpau/mplayer ../
cd ..
wget http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/nature_704x576_25Hz_1500kbits.h264
wget http://samples.mplayerhq.hu.nyud.net/V-codecs/WVC1/FlightSimX_720p60_51_15Mbps.wmv

now to play test video:
./mplayer -vo vdpau -vc ffh264vdpau nature_704x576_25Hz_1500kbits.h264

mine mplayer fails :(

and when I check to see what video output drives it supports there is no mention of VDPAU :(

./mplayer -vo help
MPlayer dev-SVN-r28348-4.1.3 (C) 2000-2009 MPlayer Team
CPU: Unknown CPU Typ (Family: 6, Model: 10, Stepping: 0)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE
Available video output drivers:
   sdl   SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
   fbdev   Framebuffer Device
   fbdev2   Framebuffer Device
   v4l2   V4L2 MPEG Video Decoder Output
   cvidix   console VIDIX
   null   Null video output
   mpegpes   MPEG-PES to DVB card
   yuv4mpeg   yuv4mpeg output for mjpegtools
   tga   Targa output
   pnm   PPM/PGM/PGMYUV file
   md5sum   md5sum of each frame


Any ideas?
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: play HD video on slow hardware via VDPAU...
« Reply #1 on: March 16, 2009, 02:08:04 am »
Given that a Xine lib based media player is the primary device for media playing on Media directors wouldn't your efforts be better placed rebuilding XinePlayer with a newer version of xinelib that supports VDPAU?

I don't have any real advice for your actual problem, sorry. Was the compile successful? Or any warnings to speak of?

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: play HD video on slow hardware via VDPAU...
« Reply #2 on: March 16, 2009, 03:02:22 pm »
Given that a Xine lib based media player is the primary device for media playing on Media directors wouldn't your efforts be better placed rebuilding XinePlayer with a newer version of xinelib that supports VDPAU?

I don't have any real advice for your actual problem, sorry. Was the compile successful? Or any warnings to speak of?

I want first to check that my hardware works with VDPAU and new NVidia driver, and this process in unobtrusive to LinuxMCE playback and if I mess something it doesn't interfere with LinuxMCE playback. If I mess something up with xinelib then I need to reinstall the whole LinuxMCE and that I'm still not ready to do :)

So if anybody can replicate these easy steps so we can together find what is going on here, and the whole community would benefit from this.

I'm recompiling it again and will report any errors, but it is trivial for anybody with NVidia card to try this and you will not interfere with existing mplayer or xine binaries.

UPDATE:
I have recompiled mplayer again and there are quite a few warnings but no fatal errors that are unusual... so I can't figure out why I still have no vdpau support with this patched mplayer. Could somebody please try it also.

Cheers,
Valent.
« Last Edit: March 16, 2009, 03:14:12 pm by valent »
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: play HD video on slow hardware via VDPAU...
« Reply #3 on: March 16, 2009, 05:08:16 pm »
I did all steps from checkout-patch-build.sh by hand.

Here is what checkout-patch-build.sh script does:

#!/usr/bin/env sh

set -e
set -x

co_dir=mplayer-vdpau
mplayer_rev=28348
ffmpeg_rev=16726
dvdnav_rev=1166

svn co --ignore-externals -r ${mplayer_rev} svn://svn.mplayerhq.hu/mplayer/trunk ${co_dir}
cd ${co_dir}
svn co -r ${ffmpeg_rev} svn://svn.mplayerhq.hu/ffmpeg/trunk/libpostproc
svn co -r ${ffmpeg_rev} svn://svn.mplayerhq.hu/ffmpeg/trunk/libavformat
svn co -r ${ffmpeg_rev} svn://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec
svn co -r ${ffmpeg_rev} svn://svn.mplayerhq.hu/ffmpeg/trunk/libavutil
svn co -r ${dvdnav_rev} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src libdvdread4
svn co -r ${dvdnav_rev} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src libdvdnav

patch -p0 < ../mplayer-vdpau-mplayer.patch
patch -p0 < ../mplayer-vdpau-libavcodec.patch

./configure --disable-x264-lavc --disable-x264 --enable-vdpau
make



I see that after ./configure I get this message:

Checking for VDPAU ... no

any ideas?
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

petervanderdoes

  • Making baby steps
  • Posts: 3
    • View Profile
    • My Thoughts
Re: play HD video on slow hardware via VDPAU...
« Reply #4 on: March 16, 2009, 05:24:02 pm »
I answered your comment on my blog as well. Doesn't hurt to give you the info here as well:

If I go with the steps you took described you forgot to install the include files.

You seem to have missed this paragraph.
Quote
In order to compile mplayer you’ll also need two extra files, nVidia does provide them but for your convenience I tarred them up. You can find the download link in the sidebar of this blog under Local Downloads.

How to install them is described in Prepare for configuration and compilation.




krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: play HD video on slow hardware via VDPAU...
« Reply #5 on: March 16, 2009, 06:08:21 pm »
you can also force certain files to play with mplayer instead of xinelib. On .mkv files you can change the extension to .m2ts and set them as Linux Blu Ray Disc and they will open with mplayer.

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: play HD video on slow hardware via VDPAU...
« Reply #6 on: March 16, 2009, 08:22:56 pm »
I answered your comment on my blog as well. Doesn't hurt to give you the info here as well:

If I go with the steps you took described you forgot to install the include files.

You seem to have missed this paragraph.
Quote
In order to compile mplayer you’ll also need two extra files, nVidia does provide them but for your convenience I tarred them up. You can find the download link in the sidebar of this blog under Local Downloads.

How to install them is described in Prepare for configuration and compilation.


Thanks for the answer, I missed it somehow :(
But the strange thing is when I include those two files it still fails to compile with VDPAU support :(

Then I saw that I had newer version of VDPAU files than you used in your blog post. I used "mplayer-vdpau-3532130.tar.bz2" and you used older "mplayer-vdpau-3482714.tar.bz2".

So I also tried with older version and two additional files, still fail :(

$ pwd
/home/linuxmce/mplayer-vdpau-3482714/mplayer-vdpau

$ ls vdpau/
vdpau.h  vdpau_x11.h

I have installed NVIDIA-Linux-x86-180.37 (pre-release drivers) and I have AGP Nvidia 7300GT video card.

Any ideas? Should I try installing official drivers? Am I missing something else?

Cheers!
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: play HD video on slow hardware via VDPAU...
« Reply #7 on: March 16, 2009, 08:50:43 pm »
Have you verified that your card is capable of VDPAU yet?

This app is supposed to test if your card is capable or not:

http://www.cs.rug.nl/~wladimir/vdpinfo/vdpinfo-0.0.5.tar.gz

I ran into this on a MythTV related forum.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: play HD video on slow hardware via VDPAU...
« Reply #8 on: March 16, 2009, 09:10:03 pm »
Have you verified that your card is capable of VDPAU yet?

This app is supposed to test if your card is capable or not:

http://www.cs.rug.nl/~wladimir/vdpinfo/vdpinfo-0.0.5.tar.gz

I ran into this on a MythTV related forum.

Hmmm... good point you need an nVidia 8000 or 9000 series card to use vdpau as far as i know.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

petervanderdoes

  • Making baby steps
  • Posts: 3
    • View Profile
    • My Thoughts
Re: play HD video on slow hardware via VDPAU...
« Reply #9 on: March 17, 2009, 12:05:37 am »


I have installed NVIDIA-Linux-x86-180.37 (pre-release drivers) and I have AGP Nvidia 7300GT video card.


Cheers!

I'm sorry but your graphics card doesn't support VDPAU as far as I know. Like somebody mentioned you need at least a 8xxx series.

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: play HD video on slow hardware via VDPAU...
« Reply #10 on: March 17, 2009, 03:53:12 pm »


I have installed NVIDIA-Linux-x86-180.37 (pre-release drivers) and I have AGP Nvidia 7300GT video card.


Cheers!

I'm sorry but your graphics card doesn't support VDPAU as far as I know. Like somebody mentioned you need at least a 8xxx series.

I looked at NVidia PureVideo PDF and I see that there 7300GT is supported:
http://www.nvidia.fr/docs/CP/11084/PureVideo_Product_Comparison.pdf

So I guess there is a chance that VDPAU will be supported on this card in some time in the future, do you thing I'm wrong?
Is there any AGP card I can purchase (new or used) that is supported by VDPAU? Any suggestions?
Is there some way I can ask NVidia support these questions?

Thank you all, this forum is great and especially than you Peter!
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

petervanderdoes

  • Making baby steps
  • Posts: 3
    • View Profile
    • My Thoughts
Re: play HD video on slow hardware via VDPAU...
« Reply #11 on: March 17, 2009, 04:06:07 pm »
I don't think the 8xxx series or the 9xxx come in AGP.

I just checked newegg, selecting nVidia and AGP bus and the cards listed are the FX, 6xxx and 7xxx series.

I all honestly I don't think nVidia will support the 7xxx or lower series for VDPAU. It has to do with the chipset nVidia uses to of load the CPU cycles to the graphics card.
« Last Edit: March 17, 2009, 04:07:42 pm by petervanderdoes »

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: play HD video on slow hardware via VDPAU...
« Reply #12 on: March 17, 2009, 09:00:02 pm »
I don't think the 8xxx series or the 9xxx come in AGP.

I just checked newegg, selecting nVidia and AGP bus and the cards listed are the FX, 6xxx and 7xxx series.

I all honestly I don't think nVidia will support the 7xxx or lower series for VDPAU. It has to do with the chipset nVidia uses to of load the CPU cycles to the graphics card.

Well this nVidia announcement implies it will support 6000 cards and up... but my interpretation is that this does not necessarily mean that full support for vdpau is available just that the cards are supported by the driver overall;

http://www.nvnews.net/vbulletin/showthread.php?p=1927376
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: play HD video on slow hardware via VDPAU...
« Reply #13 on: March 17, 2009, 10:55:56 pm »
Unfortunately, not a very definitive answer but here http://us.download.nvidia.com/XFree86/Linux-x86/180.29/README/appendix-h.html

It states that "most" 8xxx series cards and newer support VDPAU, plus integrated chipsets that support PureVideo (such as the 7050PV). A literal reading would mean that a 7300GT card does cannot be supported even if it has PV... its not clear that this is what they intended to say...

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: play HD video on slow hardware via VDPAU...
« Reply #14 on: March 18, 2009, 02:12:12 pm »
Wikipedia says that mine GeForce 7300GT (AGP) uses G73 GPU chip [1] and I found on nvforums that G73 chip isn't supported in VDPAU, it's a shame :(

[1] http://en.wikipedia.org/wiki/GeForce_7_Series#GeForce_7300_GT
[2] http://www.nvnews.net/vbulletin/showthread.php?p=1940615
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent