# HOWTO: Play HD video on your computer. Mplayer + VDPAU.



## Levenson (Jun 13, 2009)

Everyone hi!

*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). This VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware.

If you want to know more you can google it.) And here is the list of supported NVIDIA GPU.

Here is some information about my computer:


```
[B]$ uname -a[/B]
FreeBSD Lev.MYWORKGROUP 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Tue Jun  2 00:09:24 ALMT 2009     alex@:/usr/src/sys/i386/compile/CUSTOM-01-06-2009  i386

[B]$ dmesg | grep CPU[/B]
CPU: Intel(R) Pentium(R) Dual  CPU  E2160  @ 1.80GHz (1799.98-MHz 686-class CPU)

[B]$ dmesg | grep memory[/B]
real memory  = 1610219520 (1535 MB)
avail memory = 1559846912 (1487 MB)

[B]$ dmesg | grep nvidia[/B]
nvidia0: <GeForce 8600 GT> on vgapci0
```

The first drivers with VDPAU is 180.16, but I think you should update it for more safety. The last version is 185.18.14, and it's work grate!

Ðfter update the drivers, please create the folder vdpau in /usr/include and then copy vdpau.h and  vdpau_x11.h files there. You can find them in the doc folder of the sources of your nvidia driver.

Now we need to download the snapshot of the mplayer. There was some errors with svn version of mplaye and i can't build it and run clearly with vdpau. So i recommends you to download the snapshot.

Extract it, then go to the extract folder and run

```
$ ./configure --disable-x264-lavc --disable-x264 â€“enable-vdpau
$ gmake 
$ gmake install
```

when it's finished run 


```
$ mplayer -vo help
```

If everything is fine you will see something like that: 
â€¦
vdpau	VDPAU with X11
â€¦

Now try to play some video.


```
$ mplayer -vo vdpau -vc ffh264vdpau  'test.mkv'
$ mplayer 'test.mkv'
```

Look at the information about the top CPU processes.

The mplayer with vdpau option will use near 10% !!!!! , but with out it, it may use 99%!! 


HD samples you can take here


----------



## exp_02 (Oct 8, 2009)

I have been trying to get the latest mplayer to run on 7.2 and can not.  You post at least got me to the gmake phase.  Here is the ending error vo_directfb2.c:39:22: error: linux/kd.h: No such file or directory.  Any advice?


----------



## fidaj (Jan 9, 2010)

And how to do it for the amd64 platform?


----------

