You know what’s a pain in the ass. Watching a movie and unable to use your server. Yeah when streaming a movie over the internet it buffers a lot not only that the CPU burns like hell and the temperature exceeds more than 70C without active cooling.

The solution lies inside the CPU of RaspberryPi 4. Yes the GPU can handle the video encoding part and remove the stress from CPU.

It is easy if jellyfin is installed in docker. The docker compose for the jellyfin linuxserver.io is given below:

---
services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - JELLYFIN_PublishedServerUrl=192.168.0.5 #optional
    volumes:
      - /path/to/library:/config
      - /path/to/tvseries:/data/tvshows
      - /path/to/movies:/data/movies
    devices:
      - /dev/video10:/dev/video10
      - /dev/video11:/dev/video11
      - /dev/video12:/dev/video12
    ports:
      - 8096:8096
      - 8920:8920 #optional
      - 7359:7359/udp #optional
      - 1900:1900/udp #optional
    restart: unless-stopped

Here the devices will map the GPU to the jellyfin docker container.

Next is to go to the jellyfin admin dashboard and enable hardware acceleration. Then adjust the settings according to the usecase.

The hardware acceleration supported on raspberrypi via V4L2. Initially there was support by OpenMAX OMX but it was dropped and no longer supported.

After enabling hardware accleration the CPU is stress free and idels at 600MHz. Which is great when there are other services like wordpress containers which are hosted in the same device.

Avatar photo

By Suryah

3 thoughts on “Enabling Hardware acceleration – Jellyfin – RaspberryPi4”
  1. I’m curious to find out what blog system you are using? I’m having some minor security problems with my latest site and I would like to find something more secure. Do you have any solutions?

Leave a Reply

Your email address will not be published. Required fields are marked *