Jump to content

AMD RX570 Hardware Transcoding – GPU Decode Works, Encode Still Using CPU


Recommended Posts

Posted

Hi,

I am trying to enable full hardware transcoding on Emby using Docker on Linux. I have an AMD RX570 (Polaris) GPU and Emby Premiere. Hardware acceleration is enabled in the dashboard and VAAPI decoders are listed correctly.

The issue so far I have identified is that Emby uses VAAPI for hardware decode, but video encoding continues to fall back to software, causing ffmpeg to use the CPU heavily during transcoding. GPU load remains low and the dashboard shows “Software Encoder” for the video stream.

I have confirmed the following:

  • /dev/dri/renderD128 and /dev/dri/card0 are passed into the container

  • Correct render and video group permissions inside container

  • Hardware decoding appears to be working

  • Tone mapping enabled, hardware acceleration enabled, VAAPI selected

ffmpeg -encoders inside the container shows h264_vaapi and hevc_vaapi, but both are listed as decode-only (with a D flag). There is no AMF hardware encoder present (h264_amf or hevc_amf).

On Jellyfin, the same GPU appears to handle transcoding much more smoothly and CPU usage remains low, which makes me believe RX570 hardware encoding should be possible under Linux. But Emby always falls back to CPU for video encoding.

How can I fix this issue? Because I just bought the lifetime emby premiere license and facing this issue.

System details:

  • Debian 13 (trixie)

  • Docker

  • GPU: AMD RX570 4 GB

  • Emby Server image: emby/embyserver:latest

  • Hardware acceleration enabled in Emby

 

This is my Docker YML configuration

 

services:
  emby:
    image: emby/embyserver:latest
    container_name: emby
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    group_add:
      - "44" # video
      - "105" # render
    networks:
      - proxy
    security_opt:
      - no-new-privileges:true
    volumes:
      - ./emby_data/config:/config
      - /mnt/Seedbox/downloads/torrents/Movies:/data/movies
      - /mnt/Seedbox/downloads/torrents/TV_Shows:/data/tvshows
    ports:
      - 8096:8096
      - 8920:8920 #optional
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.emby.entrypoints=https"
      - "traefik.http.routers.emby.rule=Host(`emby.xx.eu`)"
      - "traefik.http.routers.emby.tls=true"
      - "traefik.http.routers.emby.tls.certresolver=cloudflare"
      - "traefik.http.routers.emby.service=emby"
      - "traefik.http.services.emby.loadbalancer.server.port=8096"

networks:
  proxy:
    external: true

 

I have attached the settings from the advanced tab under Transcoding menu and also a screenshot of system usage using btop and radeontop when a transcoding was triggered.

Any guidance from the team or other users who have this working would be appreciated. I am happy to provide logs or run additional diagnostics if needed.

Thanks in advance.

Screenshot 2025-12-09 at 16-26-46 HomeServer.png

Screenshot 2025-12-09 at 16-27-05 HomeServer.png

Untitled.png

Posted

This is not likely causing your encoding problem but the compose file for the official Emby Docker image uses UID/GID, not PUID/PGID. So as things are your Emby server is running as user "bin" (default UID 2) which could cause other problems down the road if you're expecting UID 1000 for the runtime user.

    environment:
      - UID=1000 # The UID to run emby as (default: 2)
      - GID=100 # The GID to run emby as (default 2)
      - GIDLIST=100 # A comma-separated list of additional GIDs to run emby as (default: 2)

 

Posted
26 minutes ago, Q-Droid said:

This is not likely causing your encoding problem but the compose file for the official Emby Docker image uses UID/GID, not PUID/PGID. So as things are your Emby server is running as user "bin" (default UID 2) which could cause other problems down the road if you're expecting UID 1000 for the runtime user.

    environment:
      - UID=1000 # The UID to run emby as (default: 2)
      - GID=100 # The GID to run emby as (default 2)
      - GIDLIST=100 # A comma-separated list of additional GIDs to run emby as (default: 2)

 

I changed them from PUID and PGID to UID and GID, but it's still same, transcoding tasks are being handled by the CPU instead of the GPU.

Posted

Attach logs requested in this thread. The hardware detection log, server log and transcoding logs from playback sessions not using the GPU. You can get anonymized logs from the server admin menu.

 

 

Posted
1 hour ago, Q-Droid said:

Attach logs requested in this thread. The hardware detection log, server log and transcoding logs from playback sessions not using the GPU. You can get anonymized logs from the server admin menu.

 

 

 

Hi, these are the logs you have requested. I couldn't find any option for anonymised logs, so I have manually removed the domain name from the log to anonymise them. I haven't touched or removed anything else in them.

embyserver.txt ffmpeg-transcode-ade83970-e2e5-4062-bf23-97b81f44aace_1.txt ffmpeg-transcode-dbf3c35e-bef1-4f87-8b27-45d45e433faf_1.txt hardware_detection-63900903835.txt

Posted

For future reference:

image.png.e8adbac6a5dc6197192902e9a71b8537.png

 

  • Agree 1
Posted

As you said it's detecting your hardware then tries to use HW accel to decode and encode but fails and falls back to software.

The error appears to be the same for both examples. Likely something support/devs would have to look into.

20:35:10.876 [AVHWDeviceContext @ 0x25b55500] Failed to get number of OpenCL platforms: -1001.
20:35:10.876 [hwmap@f2 @ 0x25be9640] Failed to created derived device context: -19.
20:35:10.876 [hwmap@f2 @ 0x25be9640] Failed to configure output pad on hwmap@f2
20:35:10.877 Error reinitializing filters!
20:35:10.877 Failed to inject frame into filter network: No such device
20:35:10.877 Error while processing the decoded data for stream #0:0
20:35:10.881 [aac @ 0x25b153c0] Qavg: 166.260
20:35:10.881 [aac @ 0x25b153c0] 2 frames left in the queue on closing
20:35:10.884 Conversion failed!
20:35:10.884 EXIT

 

  • Like 1
Posted

Ok, thank you for your time and effort to help me fix this problem.

Posted

Is it only when tone mapping? Have you tried transcoding media that doesn't require tone mapping?

There are some other threads for similar problems. You might want to monitor and post there too since they seem to have more attention from the devs.

 

 

 

  • Like 1
Posted
7 hours ago, Q-Droid said:

Is it only when tone mapping? Have you tried transcoding media that doesn't require tone mapping?

There are some other threads for similar problems. You might want to monitor and post there too since they seem to have more attention from the devs.

 

 

 

Indeed, if I force transcoding on a non-HDR file my GPU is handling the transcoding tasks, and if it is HDR then switching to CPU.

embyserver.txt ffmpeg-transcode-42237cb5-7f74-4df5-9567-dccf16a29dc6_1.txt hardware_detection-63901011842.txt

Posted

Seems to confirm what I said in the other topic that HDR tone mapping still doesn't work on AMD GPUs. From some light research it looks like Jellyfin has this working on all AMD GPUs that have HEVC 10-bit decoding, maybe an ffmpeg update is needed (and long overdue).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...