# Info Post: Rockchip MPP with Jellyfin / FFMPEG is working and is great

**URL:** <https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774>\
**Category:** Community Tutorials\
**Created:** [29 December 2023 11:25 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774 "2023-12-29T11:25:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![meco](https://dietpi.com/forum/user_avatar/dietpi.com/meco/32/6627_2.png) [@meco](https://dietpi.com/forum/u/meco)\
**Post date:** [29 December 2023 11:25 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/1 "2023-12-29T11:25:39Z")

</div>

# Rockchip Acceleration is now in Upstream Jellyfin!

Check out: [https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip](https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip)

* * *

# This is outdated:

The Jellyfin effort now lead to this really good implementation of mpp in ffmpeg:

> **[GitHub - nyanmisaka/ffmpeg-rockchip: FFmpeg with async and zero-copy Rockchip MPP & RGA...](https://github.com/nyanmisaka/ffmpeg-rockchip)**
>
> FFmpeg with async and zero-copy Rockchip MPP & RGA support

The [wiki](https://github.com/nyanmisaka/ffmpeg-rockchip/wiki) of this project covers everything regarding compilation, decoding, encoding, video filters and transcoding with ffmpeg.

For a HW accelerated Jellyfin there is a docker run command:

```sh
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

```

---

<div class="post-metadata">

**Author:** ![jamsinclair](https://dietpi.com/forum/user_avatar/dietpi.com/jamsinclair/32/5582_2.png) [@jamsinclair](https://dietpi.com/forum/u/jamsinclair)\
**Post date:** [5 January 2024 18:14 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/2 "2024-01-05T18:14:31Z")

</div>

I tested this out on my Orange Pi 5 Plus and have been very impressed so far 🤞. Orange Pi 5 Plus and other rockchip devices might finally be a SBC worth running a small media server from 🙌

It’ll hopefully make its way out in the next stable Jellyfin release ([See PR](https://github.com/jellyfin/jellyfin/pull/10748)) but for others looking to get this running in the interim I had success with a simple docker setup and systemd.

> **Simple docker jellyfin systemd setup**
>
> If you have an existing jellyfin instance, disable it with systemctl.
> 
> ```auto
> sudo systemctl stop jellyfin
> sudo systemctl disable jellyfin
> 
> ```
> 
> Ensure you have docker installed, if not, it can be installed with dietpi-software.
> 
> 1. Create a startup script at `/usr/local/bin/start-jellyfin-docker.sh` with the contents
> 
> ```auto
> #!/bin/bash
> CONTAINER_NAME="jellyfin"
> 
> # Check if the container is already running
> if [-n "$(docker ps -q -f name=${CONTAINER_NAME})"]; then
> echo "Container ${CONTAINER_NAME} is already running."
> exit 0
> fi
> 
> # Check if the container exists (but stopped)
> if [-n "$(docker ps -aq -f name=${CONTAINER_NAME})"]; then
> # Start the existing container
> docker start ${CONTAINER_NAME}
> else
> # Run a new container
> /usr/bin/docker run -d \
> --name ${CONTAINER_NAME} \
> --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
> fi
> 
> ```
> 
> 1. Make sure the startup script is executable with `sudo chmod +x /usr/local/bin/start-jellyfin-docker.sh`
> 2. In the script update the `--volume` arguments to the correct paths of your config, cache and media
> 3. Create a `/etc/systemd/system/jellyfin-docker.service` file with the contents
> 
> ```auto
> [Unit]
> Description=Jellyfin via Docker with Rockchip HWA
> Wants=network.target
> After=docker.service
> Requires=docker.service
> 
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/usr/local/bin/start-jellyfin-docker.sh
> ExecStop=/usr/bin/docker stop jellyfin
> 
> [Install]
> WantedBy=multi-user.target
> 
> ```
> 
> 1. Then run `sudo systemctl enable jellyfin-docker.service` and `sudo systemctl start jellyfin-docker.service` and check if it’s accessible at 127.0.0.1:8096
> 
> Note: This setup will serve it at the local port of 8096 (dietpi-software’s installation sets it up at port 8097). If comfortable with docker you can change the exposed ports it’s served from.
> 
> When this is available in a stable Jellyfin release you’ll want to disable the service, remove these files above and install stable jellyfin via `dietpi-software` or your usual approach.

---

<div class="post-metadata">

**Author:** ![meco](https://dietpi.com/forum/user_avatar/dietpi.com/meco/32/6627_2.png) [@meco](https://dietpi.com/forum/u/meco)\
**Post date:** [5 January 2024 19:22 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/3 "2024-01-05T19:22:28Z")

</div>

> [@jamsinclair](#):
>
> Orange Pi 5 Plus and other rockchip devices might finally be a SBC worth running a small media server from

Actually the RK3588 especially is really capable as a media server. Being able to to do \>real time HDR10 HW Tone mapping for 4K HDR content too (bc it has RGA3 while all other RK’s don’t) and 16x 1080p encodes/decodes at the same time.

---

<div class="post-metadata">

**Author:** ![sigma](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sigma](https://dietpi.com/forum/u/sigma)\
**Post date:** [16 May 2024 17:32 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/4 "2024-05-16T17:32:57Z")

</div>

I have tried to get the hardware acceleration get working, but I also get some error from ffmpeg.

Current System:

- dietpi 9.4
- official docker container from jellyfin 10.9.1
- docker command from the jellyfin doc pages [docker command]
- installed libmali (sudo apt install ./libmali-valhall-g610-g13p0-gbm\_1.9-1\_arm64.deb)
- check the files in the device folder (dma\_heap, mali0, mpp\_service, rga exist)
- check the opencl out put in the docker container (see attached file)

So in my opion everything looks good, but it crashed with different ffmpeg errors showing in the logs.

Have I something forgot or some advice what could be wrong?

Thanks and regards

[FFmpeg.Transcode-2024-05-16\_12-13-39\_0778c9b4e3bd3ef78827524479a20808\_e251d3fb.log](https://dietpi.com/forum/uploads/short-url/w6o2YtMo5jy5BbqZEelODel6U9u.log) (5.0 KB)  
[FFmpeg.Transcode-2024-05-16\_12-15-18\_a45b3429b2b3c7ca6bb0e3777fe8c3bf\_c956914a.log](https://dietpi.com/forum/uploads/short-url/rkiiHYjrIYfN05K4SjlmL8L0v8J.log) (5.4 KB)

---

<div class="post-metadata">

**Author:** ![meco](https://dietpi.com/forum/user_avatar/dietpi.com/meco/32/6627_2.png) [@meco](https://dietpi.com/forum/u/meco)\
**Post date:** [2 July 2024 08:12 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/5 "2024-07-02T08:12:09Z")

</div>

Are your permissions set correctly?  
Check here for the whole guide: [Rockchip VPU | Jellyfin](https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip)

I’d recommend you try my docker-compose.yml:

```auto
version: "3.3"
services:
  jellyfin:
    container_name: jellyfin
    image: jellyfin/jellyfin:latest
    privileged: true
    network_mode: host
    restart: always
    volumes:
      - /opt/jellyfin/config:/config
      - /opt/jellyfin/cache:/cache
      #- /mnt/media/:/media:ro
    devices:
      - /dev/dri:/dev/dri
      - /dev/dma_heap:/dev/dma_heap
      - /dev/mali0:/dev/mali0
      - /dev/rga:/dev/rga
      - /dev/mpp_service:/dev/mpp_service

```

---

<div class="post-metadata">

**Author:** ![sigma](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sigma](https://dietpi.com/forum/u/sigma)\
**Post date:** [17 July 2024 11:00 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/6 "2024-07-17T11:00:56Z")

</div>

Hi meco,

it was a problem with the permissions. I have to set the user with root permission.

Now it works. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [15 October 2024 11:01 UTC](https://dietpi.com/forum/t/info-post-rockchip-mpp-with-jellyfin-ffmpeg-is-working-and-is-great/18774/7 "2024-10-15T11:01:10Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
