Tag Archives: h264

Using mplayer with ATI UVD hardware acceleration to play h264 videos and the open source mesa driver under Linux

Since version 9.2.0-1 the open source Mesa driver supports ATIs UVD hardware video acceleration for h264 videos.

If it was enabled correctly your boot log should contain something like this:

Aug 31 18:55:22 main kernel: [drm] UVD initialized successfully.

You can easily check this with:

# journalctl -b | grep UVD

Now if you want to play a video with mplayer and make use of the new feature, you should append following parameter:

-vc ffh264vdpau

If everything went well you should see something like:

Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1280x720 => 1280x720 H.264 VDPAU acceleration

after mplayer has started.

And it’s really worth it! Without hardware acceleration the average CPU usage of mplayer was around 20% and it dropped to 1.7%!
This is how I watch dvb-c with mplayer:

mplayer dvb://Das\ Erste\ HD -vc ffh264vdpau -demuxer lavf -ao alsa:device=hw=1.0 -cache 8192

See a earlier post of mine about this subject: klick

Used source: klick