You are not logged in.

#1 2018-12-15 23:17:16

Bonhomme
Member
Registered: 2018-12-15
Posts: 13

Steam In-Home Streaming VAAPI with AMD

Hello there.

I am experimenting Arch and I must say I love how I build my custom OS dedicated for my TV in the living room, but I am facing my first wall and I really do not know what to do anymore...

For now my computer is always in Idle mode when sometimes I want to game and watch Series. So I only start xorg, then I call Steam or Kodi.

I have this card:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barts PRO [Radeon HD 6850]

I'm trying to use the hardware video acceleration for the In-Home Streaming. No matter what I do I still see `Decoder: libavcodec software decoding with 2 threads` on my client. With this error:

ffmpeg error: Failed to initialise VAAPI connection: -1 (unknown libva error).
CVAAPIAccel: av_hwdevice_ctx_create() failed

So... Here's the deal with everything I understand.

First, VAAPI should be fine.

vainfo gives me this:

vainfo: VA-API version: 1.3 (libva 2.3.0)
vainfo: Driver version: Mesa Gallium driver 18.2.6 for AMD BARTS (DRM 2.50.0 / 4.19.4-arch1-1-ARCH, LLVM 7.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

When I try with mpv, it gives me this:

Playing: big_buck_bunny.mkv
 (+) Video --vid=1 (*) (h264 1280x720 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 6ch 48000Hz)
AO: [alsa] 48000Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [vaapi] 1280x720 vaapi[nv12]

When I look where Steam is supposed to check for libva1, it is pointing to the packages I installed suggested here: https://wiki.archlinux.org/index.php/St … ing_issues

ea521000-ea522000 r--p 00000000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea522000-ea525000 r-xp 00001000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea525000-ea527000 r--p 00004000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea527000-ea528000 r--p 00005000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea528000-ea529000 rw-p 00006000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea53b000-ea53d000 r--p 00000000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea53d000-ea54f000 r-xp 00002000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea54f000-ea55f000 r--p 00014000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea55f000-ea560000 ---p 00024000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea560000-ea561000 r--p 00024000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea561000-ea562000 rw-p 00025000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea521000-ea522000 r--p 00000000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea522000-ea525000 r-xp 00001000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea525000-ea527000 r--p 00004000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea527000-ea528000 r--p 00005000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea528000-ea529000 rw-p 00006000 08:01 7341542                            /usr/lib32/libva1/libva-x11.so.1.4000.0
ea53b000-ea53d000 r--p 00000000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea53d000-ea54f000 r-xp 00002000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea54f000-ea55f000 r--p 00014000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea55f000-ea560000 ---p 00024000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea560000-ea561000 r--p 00024000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0
ea561000-ea562000 rw-p 00025000 08:01 7341545                            /usr/lib32/libva1/libva.so.1.4000.0

I am not too sure how "libva" and "libva-mesa-driver" (in my case with my hardware). I assume Steams uses 'libva1', 'libva1' uses 'libva-mesa-drive' and 'libva-mesa-drive' uses my graphic card.

If it could help. Kodi also seems to not work with VAAPI. When I activate the VAAPI options in the settings. I only see ff-h264 in the "playing details". No ff-h264 VAAPI or wtv. In kodi, vdpau seems to work. I can see ff-h264 VDPAU when I launch a video. But, I believe steams do not support it ? Even with VPDAU, I still see `Decoder: libavcodec software decoding with 2 threads`.

I tried to apply this from this thread https://bbs.archlinux.org/viewtopic.php?id=186118 but I think it is outdated and could not work in my situation.

Thank you for your time and if you need more information, just ask. Have a nice day.

Offline

#2 2018-12-16 14:59:13

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,687

Re: Steam In-Home Streaming VAAPI with AMD

That's not going to be easy ...

https://www.reddit.com/r/Steam/comments … how_is_it/
https://community.amd.com/thread/203217

AMD cards use libva-mesa-driver to communicate with vaapi, no clue if that can work with libva1 .


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2018-12-21 14:36:52

pYrO1v1aniac
Member
Registered: 2011-11-03
Posts: 51

Re: Steam In-Home Streaming VAAPI with AMD

I'm sorry to say for now, it won't work on the base AMDGPU stack because the Steam devs haven't implemented VAAPI encoding for Mesa, even where it's available. They instead added support for AMDGPU-PRO, using VDPAU encoding, it's available from the AUR. Most users wouldn't want to go down this road because it requires using an outdated kernel.
https://github.com/ValveSoftware/steam- … ssues/4890

Last edited by pYrO1v1aniac (2018-12-21 14:38:16)

Offline

#4 2018-12-22 21:19:29

Bonhomme
Member
Registered: 2018-12-15
Posts: 13

Re: Steam In-Home Streaming VAAPI with AMD

Interesting. Thank you both of you for the answers.

If I am correct the architecture of my GPU (Radeon HD 6850) is TeraScale 2, so, according to: https://wiki.archlinux.org/index.php/Xorg#AMD using AMDGPU PRO is not even an option ? I'll try installing the AMD Catalyste drivers. Maybe it will work.

Steam devs haven't implemented VAAPI encoding for Mesa, even where it's available. They instead added support for AMDGPU-PRO

Where did you get this information ? I'm curious to know, today, what AMD stacks are compatible with Steam for the streaming.

Offline

#5 2018-12-23 11:40:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,687

Re: Steam In-Home Streaming VAAPI with AMD

I'll try installing the AMD Catalyste drivers.

You'll have to downgrade kernel and xorg to old versions (approx 3 years ago) to get catalyst working.
catalyst packages in AUR are unmaintained and need changes to succesfully build.

While it's technically possible to do that, you'll need good troubleshooting skills and understanding of arch package building.

Are you sure the benefit outweighs the investment ?


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

Board footer

Powered by FluxBB