[SOLVED] h264 Video Acceleration on Linux with AMD Graphics

[SOLVED] h264 Video Acceleration on Linux with AMD Graphics

Postby vecciora » Jan 24th, '13, 15:43

I'm using AMD E350 Radeon HD 6310 and I want to have a video player which support GPU video acceleration. I don't know how to get XvBA works with VLC. MPlayer-VAAPI performs very well but displaying wrong colors for certain videos as you yan see in the picture below.

Image
Last edited by vecciora on Jan 25th, '13, 12:46, edited 1 time in total.
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29

Re: h264 Video Acceleration on Linux with AMD Graphics

Postby doktor5000 » Jan 25th, '13, 00:13

For VLC, you need to go to Tools -> Preferences -> Input & Codecs -> Use GPU acclerated decoding.

For VAAPI, you may want to look at https://wiki.archlinux.org/index.php/VA-API or
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: h264 Video Acceleration on Linux with AMD Graphics

Postby vecciora » Jan 25th, '13, 06:15

doktor5000 wrote:For VLC, you need to go to Tools -> Preferences -> Input & Codecs -> Use GPU acclerated decoding.

For VAAPI, you may want to look at https://wiki.archlinux.org/index.php/VA-API or


The VLC thing doesn't help. Video playback is still choppy.

I don't think VLC can perform as good as MPlayer-VAAPI do since it does decoding in GPU at the decoding stage only (read http://wiki.videolan.org/VLC_VAAPI). VLC doesn't perform really good on Windows too when compared to K-Lite Codec Pack's Media Player Classic even when having GPU accelerated stuff enabled. I'm not sure if it's because Radeon HD 6310 doesn't have UVD (http://en.wikipedia.org/wiki/Unified_Video_Decoder)?

I think that MPlayer-VAAPI works. I don't know how it is but it's playing the video smoother and using less memory. The only problem is that wrong colors stuff.

I have installed libva1, vaapi-driver-fglrx, gstreamer-vaapi, and anything related to VAAPI but I don't really know for what.
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29

Re: h264 Video Acceleration on Linux with AMD Graphics

Postby vecciora » Jan 25th, '13, 12:00

Hello this is the result of 'vainfo' command.

Code: Select all
libva: VA-API version 0.32.0
Xlib:  extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD


The second line is bothering me somehow. I mean it looks like that I need to enable that DRI thing.

Actually I'm reading this post http://forums.opensuse.org/english/get-technical-help-here/applications/453773-need-guide-using-xvba-vaapi-ati-graphic-hardware-opensuse.html currently. It looks interesting. It looks like it could make VLC plays video with GPU acceleration (read http://wiki.videolan.org/VLC_VAAPI#ATI).

I will try to enable DRI somehow and see the result.
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29

Re: h264 Video Acceleration on Linux with AMD Graphics

Postby vecciora » Jan 25th, '13, 12:45

Oh, I see where is wrong. The /etc/environment should be
Code: Select all
LIBVA_DRIVERS_PATH=/usr/lib64/dri
LIBVA_DRIVER_NAME=fglrx

and not
Code: Select all
LIBVA_DRIVERS_PATH=/usr/lib64/dri
LIBVA_DRIVERS_NAME=fglrx


I've added 'S' in 'LIBVA_DRIVER_NAME' mistakenly. Now, the 'vainfo' output.
Code: Select all
libva: VA-API version 0.32.0
libva: User requested driver 'fglrx'
libva: Trying to open /usr/lib64/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD


And now VLC plays the video smoothly and eating less CPU.
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29

Re: [SOLVED] h264 Video Acceleration on Linux with AMD Graph

Postby vecciora » Jan 25th, '13, 12:51

Well, actually it's not solved yet. I still not sure whether VLC really have accelerated or not.
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29

Re: [SOLVED] h264 Video Acceleration on Linux with AMD Graph

Postby vecciora » Jan 26th, '13, 01:28

There is no hardware decoder support for 10 bit. MPlayer-VAAPI tries to decode 10 bit video as 8 bit, which results in artifacts. Just chatting at #mplayer @ freenode IRC and I got some information.

Maybe ffmpeg is too old or something. Or maybe that the MPlayer is too old or something. The MPlayer-VAAPI in Mageia is from 2011. Not the latest development snapshot of the source code. Maybe it is what causing MPlayer to display color incorrectly.

edit: sorry but currently there is no 10-bit video hardware decoding right now :oops:

I have compiled VLC from source with vaapi and avcodec enabled. Video playback is much better now because it's really working now. I'm sure because I got a message "[0x7f95ccc029d8] avcodec decoder: Using VA API version 0.32 for hardware decoding." in terminal. Another problem occurs though. The chipset really heating up and the fan moves at full speed because of this! Even after VLC is closed!
vecciora
 
Posts: 97
Joined: Oct 19th, '11, 14:29


Return to Video

Who is online

Users browsing this forum: No registered users and 1 guest