-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enabling vaapi #37
Comments
Did you build a vaapi supporting version of the container? |
You'll also need to pass your VAAPI device to the docker container
Device path may vary depending on your system Also using just --hwaccel vaapi will only get you a decoder, you'll also need to choose a VAAPI enabled encoder as well for encoding Getting full hardware level decoder to encoder passing without software abstraction gets even more complicated, see the HWAccel ffmpeg guide and the numerous issues on the main SMA repo for that but it will require you setting pretty much all the hwaccel related options The radarr-sma repo also has some issues regarding VAAPI setup you can browse through |
Yes I did both build as well as pass /dev/dri to the container...here is part of the docker-compose.yaml for Sonarr: sonarr: |
I wonder if this is an issue of mixing mono and Ubuntu. I believe the developer branch of Sonarr has migrated to mono but the VAAPI build of FFMPEG is Ubuntu. Does rolling back to an earlier tag of Sonarr that's still on Ubuntu fix the issue by chance? |
I switched the tag to latest and have the same issue... E: Sub-process /usr/bin/dpkg returned an error code (1) |
It looks like the 'latest' tag has also been rebased to mono at this point (as of April) so that switch back to latest probably didn't change anything, feel free to correct me if I'm mistaken here mdhiggins/radarr-sma#34 (comment) One option that might work is to not build FFMPEG or use the jrottenberg FFMPEG at all and instead use mono and pull FFMPEG from the repo, see that link for a radarr example but Sonarr should work too (at least on the develop tag which is definitely on mono) |
i've done the update and the libva error is gone, how would i confirm that ffmpeg is using vaapi? |
You would have to look at your CPU/GPU usage during a job being run and then compare it with the VAAPI options turned off. Remember, adding the hwaccel parameter only turns on the decoder not the encoder though and decoding isn't all that intensive and not all input codecs will have a hw decoder. For the most performance gains I would include a VAAPI encoder as well (by adding it to the video codec list as your first codec) https://unix.stackexchange.com/questions/525473/vaapi-usage-monitoring h264vaapi and h265vaapi are the most common encoder choices |
I try to enable vaapi on both sonarr-sma and radarr-sma but get the same error in the log:
E: Package 'libva' has no installation candidate
when i check ffmpeg -hwaccel i get:
ffmpeg: error while loading shared libraries: libva.so.2: cannot open shared object file: No such file or directory
How can I confirm it is utilizing the gpu when re-encoding?
The text was updated successfully, but these errors were encountered: