I was hoping to write a lengthy post about VDPAU support for MPlayer in the portage tree, but since my harddrive crashed this week and I’m still recovering from that, a small announcement will have to suffice for now.
I just added a new ebuild to the tree this week for MPlayer, which has support for the much talked about VDPAU which comes with nvidia video cards and binary drivers. If you don’t know what that is, it is probably most simply described as XvMC for more codecs: MPEG1, MPEG2, MPEG4 (H264), WMV, VC1. The player offloads a lot of CPU decoding to the video card instead of your processor, meaning cheap video cards and cheap computers can playback HD without any hiccups.
In theory, at least. I don’t know how well it works since I haven’t been able to test it much, and whenever I do, I can’t get it under 50% CPU anyway.
Anyway, you are free to try it of course. The latest mplayer ebuild is 20090226.28734. The naming scheme changed to reflect both the release date of the snapshot (Feb 26 2009) and the SVN revision from upstream (28734). There is a “vdpau” use flag you’ll need to enable on the ebuild, and you’ll need v180.22 or higher of nvidia-drivers. In this case, nvidia is releasing updates with new drivers, so the more recent the better.
Here’s some cool stuff to read about VDPAU and what it can do:
nvnews forum thread: mplayer and vdpau – see the third post for samples to test and mplayer command lines.
Oh yes, using it is pretty much a matter of mplayer -vo vdpau foo.wmv. You may or may not need to use the -vc argument. I haven’t looked closely. See “mplayer -vc help | grep vdpau” for a reference, or the man page.
As far as the mplayer ebuild goes, there have been a lot of changes. I’d been queuing them up for a good while waiting to push them live. I had hoped to have a finished document accompany the release, but I haven’t given much time to it, and since VDPAU came out, I figured it would be better to release the ebuild.
It’s currently masked, but won’t be for long. One nice thing it does is it splits up the real use flag into two: real and realcodecs. I found that some users were confused and thought that they had to enable the realcodecs use flag to get any support for real codec playback, but that was never the case, as libavcodec always had support for some. Now, the real flag will enable the internal support, and realcodecs will still use the external binary ones (not recommended).
Also, since libdvdnav got accepted into the mainstream build, we no longer have to rely on a masked, external dependency, so the dvdnav use flag is unmasked, available, and enabled by default. You can playback DVDs browsing the navigation menus by using mplayer dvdnav:// instead of mplayer dvd://.
Other use flags that were added were faac, faad, and tremor. If you want native support for AAC playback, just enable the aac use flag. If you want to use the external libraries instead (faac and faad), then just disable the aac use flag and enable the other ones. Tremor is the internal support for Vorbis playback.
The last change to the ebuild is that now lots more use flags are enabled by default. I found out that a lot of people were going in #mplayer complaining that their builds weren’t working when really it was just not compiled with much in it. As a result, I’ve changed it so it will enable just about every internal library and external codec. That should make things simpler for users who want things to “just work” out of the box.
That’s it for now. I’ll be bumping the ebuild again, soon, and regularly as long as the VDPAU development in mplayer keeps moving at a hectic pace.