-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPI4 Hardware Acceleration Fix #14
Comments
I am down for embedding some stuff into the aarch64 image to support openmax , what kind of performance difference did you see and what codecs are currently supported ? |
I can encode x264 using HWA. I still have to decode x265 using software (until it can be patched to include it). The HEVC decoder will require a bump in video ram but the x264 encoder seems to work fine with the default 78Mb. I'm not sure what audio accelerations are available. x265 10bit 4.2 Mbps > x264 8bit 7.8 Mbps. No audio conversion, I hover around 320% to 380% CPU usage but no stuttering, I can seek to a new position in the video in ~5 seconds. If I turn off HWA. Video will stutter every couple seconds and isn't watchable. Here are the ffmpeg logs, not sure what's up with libx264, the speed is all sorts out of whack lol.
|
cool stuff. What is the contents of |
pi@raspberrypi:~ $ ls /dev/vchiq The file is text based, would you like it posted? |
no , just weird that it is a single file like that , we use the following find command with other video devices to pull their information and add the abc user in this container to their group to be able to directly open them.
Does this actually print the device when run ?
|
nope, it returned nothing. |
who is it owned by ? |
crw-rw---- 1 root video 243, 0 Jan 1 21:16 vchiq |
Can you try this out (change your puid and pgid to what you use local)
This should fix you having to run as root and needing to install openmax bins, but I cannot embed the Rpi firmware stuff in the images so that will always be a bind mount. |
No dice. the package didnt install properly. it couldn't find the latest and had to fallback to .9.3.4. 1000:1000, no update - ffmpeg exited 255, no useful logs
root
update logs
So this is where I'm at, I'll look into it tomorrow as to what I'm missing. |
So while running as root, adding abc to the video group fixed it. let me start from scratch and see if that's the issue |
try this tag: I was using a file guard for the device ownership logic should have been |
so something funky is going on with the permissions. With both patches, I can't get HWA working at all while with the normal linuxserver/jellyfin, installing the 3 packages makes it work. Also, we're missing some permissions for abc. When I run it as abc, ffmpeg will exit with code 255 and won't have accessed the openmax module. Root will exit ffmpeg with code 1 for the accelerator failing.
|
I gotta check, because what you are saying is not possible those libs are specifcially installed :
You are swapping the tag and using the lsiodev endpoint right ? |
Yeah, the install log was based on the normal image, I was providing it in case it could provide some info. Any idea why I can't use HWA as root on your dev images? |
I have not forgotten about this, but it is very difficult to make something optimal without local hardware to test on. To see the perms and ensure abc is a member of the video group :
You are mounting in a custom ldconf file but unless you run |
dev image
Confirmed that ldconfig was the issue. After running that command, I could use HWA as root. |
So the only thing left is to determine how I can test for that vchiq device effectively
This will let me determine the test operator to use to find the existence of this device and add abc to it's group. |
|
Thank you sir, will have something to test in the next two hours |
@Artiume please destroy/stop your existing container and run just this compose with your PUID and GUID swapped out for what has access to your /media stuff:
This is an ephemeral test, and does not mount up anything that is not needed. |
success :) for my own learning, what all did you do? I'm also not quite sure what the test operators were for /dev/vchiq |
All the logic is here: I'll PR this into the main image now that you have confirmed it works. |
If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.
Expected Behavior
HWA should work.
Current Behavior
HWA fails to work.
Steps to Reproduce
I wrote this guide for HWA. In order to get HWA working, I had to make a few hacks and would like to pass on what I learned to the lsio team.
I also needed to install the library libomxil-bellagio-dev
This installed libomxil-bellagio0, libomxil-bellagio-bin and libomxil-bellagio-dev. I'm not sure which were essential but -dev installed all 3. I also had to run the container as root, but that might have been due to the Path hacks or permissions else where, I'm not sure.
Environment
OS: Raspbian
CPU architecture: x86_64/arm32/arm64 Rpi4
How docker service was installed:
Command used to create docker container (run/create/compose/screenshot)
Docker logs
The text was updated successfully, but these errors were encountered: