BackTrack4 (pre) final: Vdpau support for mplayer

Disclaimer: Note that below non BT4 sources will be added to your BT4 sources.list.
Be forewarned to expect no support from the dev team if you follow this guide
and something goes wrong.

Prerequisites:

  • Full / Persistent BT4 (pre) final install. * GeForce 8 series and later GPU hardware.
  • Latest official nVidia graphics drivers
    - Recommend the latest cuda drivers (see pureh@te's pyrit-cuda-nvidia-tutorial)

Why would you want vdpau support?
VDPAU (Video Decode and Presentation API for Unix) is an API designed by NVIDIA for its GeForce 8 series and later GPU hardware, targeted at the X Window System on Unix operating-systems (including Linux, FreeBSD, and Solaris). The VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware.

What it means is you can use your gpu to help decode video and free up your cpu for more important tasks...
In other words you can watch 1080p Fußball on your second display while pentesting and not suffer major performance penalties.

Getting Started.
To get vdpau working we are going to add software from a Personal Package Archive.

To do this open a terminal and execute:

Code:
sudo cat >> /etc/apt/sources.list << "eof"
# VDPAU PPA's
deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu intrepid main

eof
Next we need to autenticate the PPA. Do this by executing the following:
Code:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767
sudo apt-get update
Special tanks to the Nvidia Vdpau Team...

If all went well we're now ready to install libvdpau-dev which we'll need to compile mplayer with vdpau support.
Do this by executing:
Code:
sudo apt-get install libvdpau-dev
We are now ready to build and install mplayer. Execute the following to checkout and build the latest mplayer snapshot:
Code:
mkdir ~/build && cd ~/build
curl -v http://www.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2 -o mplayer-checkout-snapshot.tar.bz2
tar -jxf mplayer-checkout-snapshot.tar.bz2
cd mplayer*
./configure --enable-gui --disable-x264-lavc --disable-x264 --enable-vdpau --target=i686-linux --prefix=/usr --confdir=/etc/mplayer --mandir=/usr/share/man
If you have a core2 also execute:
Code:
sed 's/i686/core2/g' config.mak > /tmp/config.mak
mv /tmp/config.mak config.mak
Next we can compile mplayer by simply executing:
Code:
make
If all went well all that is left is installing and cleaning up.
Do this by executing:
Code:
sudo make install
cd ~/ && rm -rf ./build
Launch gmplayer open preferences and change the video driver to vdpau.

Enjoy...