Unable to transcode, Jellyfin in docker, in jlmkr, on scale 24.04.2

I’m trying to get Hardware transcoding to work in jellyfin, with docker, in jailmaker, on scale 22.04.2 using an amd r7 250. Can’t seem to get it working.

I’ve set the following in the jail config:

gpu_passthrough_intel=1 (which passes through the /dev/dri directory)
–bind=‘/dev/kfd:/dev/kfd’

I’ve set the following in the docker-compose file:

services:
  jellyfin:
    container_name: jellyfin
    image: linuxserver/jellyfin:10.9.11
    ports:
      - 192.168.10.34:8096:8096
      - 192.168.30.34:8096:8096
      - 192.168.10.34:7359:7359/udp
      - 192.168.30.34:7359:7359/udp
    environment:
      - DOCKER_MODS=linuxserver/mods:jellyfin-amd
      - PUID=852
      - PGID=852
      - TZ=America/New_York
    volumes:
      - /docker/data/jellyfin/config:/config
      - /mnt/movies:/media/movies:ro
      - /mnt/music:/media/music:ro
      - /dev/dri:/dev/dri
      - type: bind
        source: /dev/kfd
        target: /dev/kfd
    restart: unless-stopped
    cpu_shares: 512
    memswap_limit: 2048M
    deploy:
      resources:
        limits:
          cpus: "4"
          memory: 2048M

The /dev/dri and /dev/kfd locations are verified to be present in the container.

I’ve set the transcoding in jellyfin to VAAPI, and set the device to /dev/dri/renderD128

But when i try to play a video it just gives a playback error. I did notice that the GID for the render directory is different on scale, vs inside the jail. Could this be the issue? and how would i fix that?

Can I ask why using jailmaker instead of the Apps itself?

Also, what file types are you trying to transcode? the R7 250 can only do H264 decode, not h265

I was originally using docker in a debian VM. I moved them to a debian jail.
I’m also using dockge to manage them, and I guess because i just prefer it at this time. Might switch stuff over in 24.10 when it’s fully released and native docker is an option.

Some files are h264, some are h265. I only have enable hardware decode set for h264.

I would assume it would use software decode for h265? and hardware encode to h264? Or is that not how it works?

I would suggest moving over to Electric Eel and use the native docker to begin with, as the stable build comes out at the end of the month anyway, saves you having to rebuild this. I’ve been using it, working okay so far no issues.

However! Saying that, if you want to carry on with this method, I would double check that your GIDs from Scale to Jail are matched correctly, you can do it that with I think (don’t quote. been a while!) ls -l /dev/dri/renderD128 then within your jail run it again to check the GID is the same.

If it’s different, then you’ll need to match them in docker, though I’ve never done this so someone might understand the process better.

You can also chmod it to make sure you have permissions to that render device.

Also, what are your jellyfin logs saying? Usually they give a bit of extra info, default location should be: /config/log/jellyfin/jellyfin.log

My theory above is that it may be permissions related, as the group ID on scale is different than in the jail. So i’m going to try to fix that.