Welp, I think I’ve applied the patches. What options do I need to use for ./configure?
Would ./configure --enable-rkmpp --enable-version3 --enable-libdrm be enough, or should some other flags be added?
In case you’re curious, daring, or want to retrace my steps, here’s the patches for ffmpeg=5.1.1. It seems to work, but I don’t really have a good idea what I’m doing…
Could you please share the steps for building Kodi as well?
I don’t have any of the options for “PRIME” and/or “DRM”, so I’m guessing I’ll need to rebuild it with some extra flags or something.
I’m also interested to know what compile options you used @amazingfate ( I looked into the .deb build logs but I’m not sure all of those options are needed)
Will this only work on Ubuntu Jammy? I’m running the armbian bullseye CLI image and am wondering if this can apply there - including the rockchip-multimedia ppa for ubuntu jammy.
Has anyone gotten hardware acceleration set up & usable by Jellyfin (in Docker, in my case) command line only OS? Curious what the setup/settings are to get it running.
It does somewhat work on armbian with the rkmpp ffmpeg you can find in the forums here. Just install jellyfin, said ffmpeg(only hwdecode), set jellyfin to use custom ffmpeg. Interestingly with hw decoding the software encoder is fast enough to do 1080p in Realtime(>30fps) for 1080p with the very fast h264 profile. No hw encode yet unfortunately
Tried it and it soft-crashed my rock5 (it first started working and is still connected to the network but I can’t seem to even ping it). Will edit this post later to report what actually happened.
EDIT: it works but is too slow. Unusable even. Removing. Also, removing docker. Containers are the worst.
Thanks for this @John_Deaux, I’ll give that a go. I imagine that this is using VAAPI? And did you have to pass any devices/variables through docker in or to get this to work? Or because it’s making use of the system ffmpeg (which I imagine I will have to map as a volume to the container) there’s no additional device mappings needed?
I currently have the following in my compose file:
# VAAPI Devices (examples)
- /dev/dri/card0:/dev/dri/card0
- /dev/dri/card1:/dev/dri/card1
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/renderD129:/dev/dri/renderD129
group_add:
- "109" #render group id
And in Jellyfin the VA-API device is set as /dev/dri/renderD128.
you shouldnt need to set anything in jellyfin, as I stated only hardware decode works, which boosts it just enough to do a veryfast profile 1080p encode in realtime. The encoding is still done with the cpu. AFAIR the ffmpeg with rkmpp has its own decoder which should be called something rkmpp_hwdec (just do ffmpeg -encoders | grep rk to find the right one). It is automatically used by ffmpeg
Word of warning - I did run into crashes on armbian, and I am not sure its because of ffmpeg, even though the crashdump seemed video decoder related. I do believe that jellyfin was indexing files and encountered a file that the hardware decoder didnt like. not sure though, I reverted back to debian and gave up with hw enc/dec for now, and instead use the jellyfin app on all devices. works for me
I’m not sure what I’m doing wrong when it comes to setting the custom ffmpeg in Jellyfin. I set up /usr/bin as a volume mapped to the docker container, then in Jellyfin I pointed the ffmpeg path to where it is mapped in the container. I can see the ffmpeg file in the Jellyfin file picker, but am always treated with the following error:
We’re unable to find FFmpeg using the path you’ve entered. FFprobe is also required and must exist in the same folder. These components are normally bundled together in the same download. Please check the path and try again.
I have tried setting chown as the standard user and even chmod 777 for testing purposes and still Jellyfin pitches the same error. What am I missing?
Try to attach to container and launch your mounted ffmpeg binary, and it will output smth like that /usr/lib/jellyfin-ffmpeg-custom/ffmpeg: error while loading shared libraries: libblas.so.3: cannot open shared object file: No such file or directory
This error means you need to provide (mount) libs for ffmpeg
E.x: