Got HW Transcoding to work with libva/vaapi on Ryzen APU (Ryzen 7 4700U)

It’s much more present for me unfortunately
Using Ryzen 5 5600g APU :frowning:

you tried with the linuxserver image and the mod posted by syst.m?
was gonna try that as well but if you already tried and have colored frames I dont need to…
PS: either way if you have already done the work, you can submit this as a mod for plex to lsio

You can use the image in docker pull ghcr.io/skjnldsv/docker-plex:master

I am using docker compose. Works fine, hdr mapping doesn’t get hardware acceleration. But the Apu does take over. Just had a lot of weird artifacts :confused:

yes, that artifacts come up with HDR turned on was already known and has been an issue forever…
however it seems your image works fine with hardware acceleration!
within that version i didnt know where to check which transcoding is used as i cannot see it in the dashboard anymore but judging from cpu utilization, hw transcoding was used and i have no artifacts (tested 2mins) with HDR turned off! :slight_smile:

you should definitely turn this into an official linuxserver mod! would benefit their community

Unfortunately this also happen on non HDR movies :confused:
image

image

yea… i now made a longer test and it still does the same for me… was lucky to have two minutes working fine as now it seems to not stop flickering with colors :frowning:
sux

I think there’s some sort of regression in the Mesa/VAAPI drivers. Not really sure what we can do about it.

Emby can use HW transcoding without this issue. Trust it’s caused by plex it self.

can confirm the red flashing is happening to me as well with a 5600g. turning OFF “Use hardware-accelerated video encoding” seems to fix it for now.

1 Like

Alguna novedad? Estoy pensando en comprarme un Ryzen 5600g para un servidor PLEX , esta de oferta ahora mismo.

FMI is HW transcoding working on windows server?

according to the plex support article found here , Plex Server on Windows does have the capability, but is not tested and provided as is.

it works totally fine on windows, i used to run server on 2400g apu windows machine

I am not sure if I am a bit retarded or not. But I cant get the HW decoding to work. Seems like its only using software/CPU. I Am running a Ryzen 3400GE APU on Ubuntu (native, not VM).

theboys

I tried to follow a guide above (doing this sudo cp /usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.* /usr/lib/plexmediaserver/lib/libdrm_amdgpu.so.1)

vainfo shows this:

I also found this in the Plex Media Server Log file:

Seems like I dont have anythin regarding AMD or Radeon here.

Not sure if it have anything to do with the problem or not.

when I look at the Plex Mediaserver libary, the radeon drivers are white (not Executable or recognized data file)

Let me know if there is anything else you guys need :slight_smile:

Best regards,
Martin

Depends on the AMD GPU. HW transcoding will work on my ageing RX580X but the output is nasty so it is software all the way for that GPU. This is why Plex make the comment about AMD GPU’s.

NVM, changed my Ubuntu-server to a Win11 machine and everything works great.

The reported corruption of HW accelerated output might be caused by this: AMD va-api outputs corrupt encoding (#6734) · Issues · Mesa / mesa · GitLab

Hope it get fixed soon.

@mauimauer So it seems the fix is included in recently released mesa version v22.2.0?

Unfortunately I still get a lot of colour flashing (and extreme artifacting) with mesa 22.2. I use a custom image I build myself and have debugged extensively, and I’ve come to the conclusion that the problem is specifically with Plex Transcoder, rather than drivers.

Using jellyfin-ffmpeg5 inside the same container works perfectly with HW transcoding (mesa >= 21, Ryzen 5700G), while using Plex Transcoder causes colour flashing and artifacting. This was the case prior to 22.2 as well and I’ve verified with identical ffmpeg commands running manual transcodes.

If Plex didn’t use a custom build of ffmpeg packaged as Plex Transcoder then we could simply swap it out for jellyfin-ffmpeg5 and everything would work. Wonder if it would be possible to build jellyfin-ffmpeg5 from source with Plex compatibility built in…

I tried UnicornTranscoder as well, targetting jellyfin-ffmpeg5, but didn’t get very far with it.

Are you on Mesa 22.2 release? AFAIK the issue related commit has been reverted.