Linux H/W Accelerated HD Playback - nvidia

archish

Level D
Well didnt find much info on hardware accelerated hd playback support in linux in TE so decided to share what i got :hap2:

History
NVIDIA had introduced VDPAU in 2008 to hardware accelerated decoding of HD content. It didnt have any supported players at that time and mplayer was the first one to have the added support with some patches. Nvidia 180.33 gfx driver upwards have support for VDPAU.

Fast forward to present, things have improved a lot now, mplayer, xine and few more players are having support for vdpau. VLC may also have vdpau supported in future.

Before we start
I am pretty much bored with compiling the binary all the time in Linux distro and had stopped using linux earlier as I ended up compiling most of the stuff on my ancient celeron 266 hardware. That was some 4 years back, now after Canonicals nicely integrated Ubuntu, I am in love with linux again :)
The best part is there are so many repos out there that I need not worry of compiling even though i have a decent dual core proccy.

Well so this small info is applicable only for Ubuntu disto :P but you can still go the old way of compiling and getting it done. Others can chip in with the binary repos for their distro ;)
Required Ingredients:
Ubuntu
Nvidia 8XXX or Higher GFX card
Net Connx :P
HD movies
Lets start cooking :tongue:

Compiling from source
Check this link: How to compile mplayer with vdpau support on Ubuntu | My Thoughts
Not interested to explain the whole thing again :P
The only thing to add or to be precise remove from that link is you can skip this part as latest svn version has got the includes.

tar xf vdpau_20090305.tar.gz
mv vdpau /usr/include/

Installing from Binary - Ubuntu only
My fav, windoze style :tongue:

Add the repos to ubuntu sources from below link, this ppa has got smplayer also so kubuntu users may also benefit from this :P
https://launchpad.net/~rvm/+archive/mplayer

Whats next, hit the Synaptic Package manager and install the latest version from this repos ;)

Before you start enjoying, make sure the drivers are 180.33 or higher.
Jaunty ships with 180.44 so this should not be a cause of worry for them, older distro they need to upgrade before they start using mplayer.

Showdown
Grab your fav hd movie, dont forget pop corn, open mplayer, in preferences make sure the video output driver is vdpau and start enjoying :P
To confirm that everythign is working fine, open terminal and type top, mplayer cpu usage should be less than 10%, on my C2D it hovers at 4-5% when the cpu is running at 800mhz

The best part :D 720p, 1080p, throw whatever you want and it will play it with ultimate smoothness :hap2:
BTW I find the picture clarity to be better than software decoders :D

Popcorn anyone? :tongue:
 
i just recently tried the exact same thing from the exact same link - note vdpau download is updated from the nvidia link in the article... my config is messed up a bit as my kmplayer KDE frontend for mplayer doesnt work well... but running directly does have low CPU utilisation (compared to VLC which maxes out one core and the movies stutter)... although i still see a few jerks/skips with vdpau too...
 
which version of nvidia driver are you using? i found some variation in quality and playback smoothness in each driver version.

BTW has anyone given the mplayer with ffmpeg MT support a try? cant find any binary links of it, it tried compiling and ended up with a broken mplayer.
 
im using 190.18 beta... i should also try patching ffmpeg MT... VLC 1.0 currently sucks for full HD... cant wait for their v1.1 which might have native vdpau support...
 
i tried till 185.xx got fed up of nagging small issues and went back to 180.xx series. Stable n smooth.

I find VLC sucks in linux as a whole....personal opinion ;)
 
installed as in?

first driver should have vdpau support

2nd the player should have vdpau support to utilize the functionality

I wish ATI did that earliest, there are nice n cheap 13' lappy available with ati gfx, now i have to search for nvidia gpu alone. anyway competition is always good :D
 
will this help this problem i have : playing movies 700MB rips, GPU temp. rises to above 60C and then the video starts stuttering and the screen starts becoming red many times at random intervals for some Mseconds
 
hmm what model gfx card are you having? I hope the the 700 mb rips you are reffering is h.264 content as xvid/dvix decoding is not supported.

But your problem looks more like dying gfx card.
 
archish said:
hmm what model gfx card are you having? I hope the the 700 mb rips you are reffering is h.264 content as xvid/dvix decoding is not supported.

But your problem looks more like dying gfx card.

Nvidia 9650M GT 1GB in my laptop.....i am using VLC to play my video files.....everything was fine on windows but the temperature rises only on Ubuntu
 
hmm doubt the heat is causing the screen issue, try different player, like the default totem with good,bad and ugly plugins

my 8400gs hovers arnd 55-56 and 60-65 on really hot days...

I still feel ur gpu is dying, you will know in few weeks i guess :P maybe urs is one of the bad batches of gpu with nvidia thermal issue bug

btw which laptop is this?
 
archish said:
hmm doubt the heat is causing the screen issue, try different player, like the default totem with good,bad and ugly plugins

my 8400gs hovers arnd 55-56 and 60-65 on really hot days...
I still feel ur gpu is dying, you will know in few weeks i guess :P maybe urs is one of the bad batches of gpu with nvidia thermal issue bug

btw which laptop is this?

How do i install those plugins for Totem ? Any links will help too......My laptop is an Asus N80Vn, Everything was fine when i was using Windows 7, but after i moved to Ubuntu the laptop started running hot..
 
you can install in synaptic package manager. search for gstreamer, you will find three packages with good bad ugly.

I think the frequency scaling may not be apt in ubuntu. you can try fiddling with the powermanager and check if something helps. someone had posted a link before for frequency scaling earlier. let me check if I can find that.
 
archish said:
you can install in synaptic package manager. search for gstreamer, you will find three packages with good bad ugly.

I think the frequency scaling may not be apt in ubuntu. you can try fiddling with the powermanager and check if something helps. someone had posted a link before for frequency scaling earlier. let me check if I can find that.

I already had those gstreamer codecs installed.....cpu frequency scaling is enabled and i mostly use powersave profile
 
Small update to those who are new to Ubuntu and want to use the latest stable/beta drivers by Nvidia without going to the manual install process

Installing via Jockey Style :P

  • Add this Nvidia Team PPA to your repos and click update manager. Refresh the updates and there should be some new updates related to nvidia available. Install all of them.

  • Check in Hardware Drivers you should see some new entries of Nvidia Drivers, like 185, 190 195. Select and activate :D

  • Drivers will be downloaded and restart the system....all done enjoy your nvidia desktop :D

Smplayer for H264 Decoding

  • If you want to use VDPAU for H264 decoding there is SMplayer in the same Nvidia Team repository. In Synaptic Package manager select Smplayer and accept all the dependencies.

  • Once installed in Smplayer Preferences select the video output as VDPAU and you are good to go for H264 hardware decoding.
I dont think is any more simpler method of getting the latest drivers in ubuntu :tongue:

Also if you want to have your Nvidia card supported in Nouveau just check in the NouveauEvaulation if someone has done a testing for your card else follow the instruction and update the wiki entry. If you are downloading the daily build of Lucid the latest one had Nouveau support added, just follow the testing part.
I know its not a big deal compared to the binary nvidia blob but worth a start for the future :P

Its amazing how fast the development has picked up considering it was unusable few months back and now almost ready for normal desktop usage :
(hold on folks, its still long way to go :P )
https://wiki.ubuntu.com/X/Testing/NouveauEvaluation
EDIT: If you are able to do the above step then do plan out the time do some test with nvidia binary drivers for adding power saving feature in nouveau :ohyeah: Your card will hail you :bleh:
Dont expect the power saving to be added in nouveau till 2.6.34 kernel atleast

nouveau Wiki - EmilVelikov
 
Back
Top