Jump to content

Jellyfin docker Hardware Acceleration


Netnax

Recommended Posts

I want to install jellyfin as a docker container on my Orange pi 5. How can I enable hardware acceleration for it? On the container page (https://hub.docker.com/r/linuxserver/jellyfin) there are instructions for various options, but orange pi 5 is not there of course. I have enabled 3D acceleration as mentioned on the armbian page for orange pi 5.

Edited by Netnax
Link to comment
Share on other sites

I use the 3d accelerated driver and this docker compose code:

version: '3.5'
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    network_mode: 'host'
    devices:
      - '/dev/dri/card0:/dev/dri/card0' #define what gpu device is being used
      - '/dev/dri/card1:/dev/dri/card1'
      - '/dev/dri/renderD128:/dev/dri/renderD128'
      - '/dev/dri/renderD129:/dev/dri/renderD129'
    volumes:
      - /yourpath:/lib #library where you have jellyfin-ffmpeg6 located
      - /your_path:/config
      - /your_path:/data/tvseries
      - /your_path:/data/movies
    restart: 'unless-stopped'

 

this code you can edit to your convenience, it seems to work for me. I have used VAAPI for transcoding, and it appears to work fine with minimum load in CPU; but i do mention that it appears that av1 doesn't run that well for now. This problem with av1 might improve in the future, I have asked the Jellyfin team to make a transcoding option for the rk3588 we just need enough votes for that dream to become a reality.

Link to comment
Share on other sites

the new jellyfin docker image had released by nyanmisaka. thanks nyanmisaka
https://github.com/jellyfin/jellyfin/pull/10748

docker run -d \
 --name jellyfin \
 --privileged \
 --net=host \
 --restart=unless-stopped \
 --volume /path/to/config:/config \
 --volume /path/to/cache:/cache \
 --volume /path/to/media:/media \
 `for dev in dri dma_heap mali0 rga mpp_service \
    iep mpp-service vpu_service vpu-service \
    hevc_service hevc-service rkvdec rkvenc vepu h265e ; do \
   [ -e "/dev/$dev" ] && echo " --device /dev/$dev"; \
  done` \
 nyanmisaka/jellyfin:latest-rockchip

 

Link to comment
Share on other sites

@LoneExile

This is my process

  • I used 5.10.x kernel, which was already there when I installed the system
  • as @nyanmisaka he said,download the OpenCL,then use 
    sudo apt install ./libmali-valhall-g610-g13p0-x11-wayland-gbm_1.9-1_arm64.deb

     

  • docker run -d \
     --name jellyfin \
     --privileged \
     --net=host \
     --restart=unless-stopped \
     --volume /path/to/config:/config \
     --volume /path/to/cache:/cache \
     --volume /path/to/media:/media \
     --device /dev:/dev \
     nyanmisaka/jellyfin:latest-rockchip

     

  • maybe need  chmod 777 -R /dev (i'm not sure to run it yes or no


image.png.f30ba52be6962e7229a7fff09802a393.png

image.thumb.png.4cb48399e0b83e266cf9bb39c1ad9fb8.png
image.thumb.png.6eaa49a1eadc232e5cfa483716cc1546.png

 

Edited by leeson
code not show
Link to comment
Share on other sites

First of all, thank you @leeson for pointing out that jellyfin image, transcoding seems to work.
However, I also want home decoding in client app, since this board sometimes is connected to  Armbian from orangepi website, hwaccel was "enabled" from their instructions, but mpv was not using it/neither did jellyfin client.
When I tried to compile modified ffmpeg from nyanmisaka github the screen goes blank, and gnome session fails to start. There were error messages in journalctl about mpp, and something along these lines recently:

Jan 09 22:04:01 orangepi5 gnome-shell[34647]: Running GNOME Shell (using mutter 42.9) as a Wayland display server
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: Added device '/dev/dri/card0' (rockchip) using atomic mode setting.
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: g_hash_table_destroy: assertion 'hash_table != NULL' failed
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: Failed to open gpu '/dev/dri/card1': No suitable mode setting backend found
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: g_str_has_prefix: assertion 'str != NULL' failed
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: g_str_has_prefix: assertion 'str != NULL' failed
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: g_str_has_prefix: assertion 'str != NULL' failed
Jan 09 22:04:01 orangepi5 gnome-shell[34647]: Failed to get string: No error has been recorded.
Jan 09 22:04:01 orangepi5 systemd[7299]: org.gnome.Shell@wayland.service: Main process exited, code=killed, status=11/SEGV
Jan 09 22:04:01 orangepi5 systemd[7299]: org.gnome.Shell@wayland.service: Failed with result 'signal'.
Jan 09 22:04:01 orangepi5 systemd[7299]: Failed to start GNOME Shell on Wayland.

For the reference I was running Armbian 23.11.1 Jammy with Linux 5.10.160-legacy-rk35xx

downloaded from the website not so long ago, not sure if this version involves all required kernel patches or not.

What would be the general direction to troubleshoot? Reinstall everything gpu related, then try compiling ffmpeg again?

Link to comment
Share on other sites

@StarboardOtter i had tryed with debian12,you need download the jellyfin client app, then add your server's ip or domain ,chose the quality as low, like this,it workedimage.thumb.png.1752b0217063160204cf90319ff94d03.png

here is the link for jellyfin client app https://github.com/jellyfin/jellyfin-media-player/releases .

In general, the Jellyfin client app works by utilizing your client device's GPU for transcoding when your client device's GPU is supported (direct play).

Otherwise, it uses your server device for transcoding.

Sorry, my English is not very good. I hope this helps.

Edited by leeson
Link to comment
Share on other sites

So with a little bit more of troubleshooting and fresh install from image:
the server side with nyanmisaka image works just fine, transcodes FHD HEVC 10bit into something browsers can play easily.
However, when I try to play the same file in mpv on the host machine rkmpp goes green screen, can play it without hardware decoding though.

Issues begin when I install jellyfin-media-player client from flathub. Please correct me if I am wrong, but flatpaks are similar to containers in a way that they probably have their own mpv without hw acceleration and that's why results are poor?
Did anyone successfully compiled a client? Github instructions seem a little outdated (python vs python3 package, it's a stupid roadblock and so far I haven't figured out how to bypass it).

 

Second edit: I realized that leeson is selecting different quality in the client, forcing the transcode probably on the server side.

Edited by StarboardOtter
Link to comment
Share on other sites

@leeson

 

just have time to try now. but on web browser and jellyfin media client the play method is direct playing. not transcode. is it allright? from what i feel. now i can play HEVC video on web browser. on my old jellyfin this won't happen.image.png.d280a27a95fbc622b19ef017d9ae55d3.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines