-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
Simple hardware encoding #3419
Simple hardware encoding #3419
Conversation
@NodudeWasTaken i have pasted the below |
Hi, this looks like a great feature. |
…are, private internal functions
As far as i can tell, only previews use software encoding, sprites/screenshots/phash (all lead to screenshot encoder) could arguably benefit from using the "ffmpeg extra input args". |
This can be addressed in a separate PR as necessary. Let's not add more scope to this PR. |
Note that the build is failing due to a merge issue against I think some extra logging is necessary for debugging and tracing purposes, and it should use loglevel of In my local build I added In my personal case, I was getting an error message about the |
Using legacy presets is removed in SDK 12 and deprecated since SDK 10. This commit removed the preset to allow ffmpeg to select the default one.
Alright, now it prints hopefully useful debug messages in the log
The main problem is that the "legacy" presets are to be removed in NVVC SDK 12, and have been deprecated since SDK 10 (https://docs.nvidia.com/video-codec-sdk/12.0/deprecation-notices/index.html) |
Upcoming feature stashapp/stash#3419
Can confirm it works on Windows. Not my Unraid server using Docker with Intel or Nvidia is there a separate repo I need to pull? like stash:development-nvidia or like stash:development-intel |
I have the same question, I tried to config hw transcoding for a week on my unraid server with no success. Hope someone can point the right direction on how to do it. I don't know how to build the CUDA as described on Unraid. |
It works on the CUDA build, im unaware of any plans or code to publish the CUDA build to dockerhub. |
Does anyone know of a way to get unRAID working with hardware transcoding? unRAID has a very large install base, and it's surprising to me that this cuda build is unavailable for unRAID users. There appears to be no way to retrofit containers either. |
First off, it's the Unraid community who creates templates for installing things through Community Applications, not the developers of every application. So that's where you should be asking for that type of request. Second, per the comment directly above yours, the cuda build is not published to Dockerhub, so if you want to use it, you must build it yourself locally. Third, you can install any docker image you want in Unraid, you don't need someone to create a Community Application for you. This is how other users in this thread are building the cuda image locally and using it on Unraid. Considering how new this is and how many other people in this thread have been unable to get it working, clearly more work needs to happen before it's a plug and play feature that can be widely released to the public. |
I see: Added in my docker compose yml: |
Thanks @DogmaDragon. That's super helpful. Any idea if I can retrofit this for Intel QuickSync? |
@TwentySeven28 check #305, I saw people talking about it there. Also you can hop into Discord for more help, it's a bit out of my wheel house. |
What
This commit test a bunch of common hardware accelerated codec's at boot.
If the user has then enabled hardware encoding in the UI, and hw acceleration is available, it replaces the mp4/h264 and webm/vp9 transcoding with available hardware accelerated codecs.
Why
Encoding is alot more expensive than decoding, which is why it makes sense to use hw encoding when available.
Regarding the specific implementation:
It would be meaningless to try unavailable codecs, so we should remember which codecs work.
It doesnt add full hardware transcoding, simply because the requirements are too strict and it would require alot of checks to verify it works.
Working encoders
NVidia NVENC H.264 is tested and working.
Intel QSV H.264 is tested and working.
Intel and VAAPI VP9 is assumed to work.
VAAPI H.264 doesn't work for direct file transcoding, but is enabled for HLS.
h264_v4l2m2m doesn't work for direct file transcoding, but is enabled for HLS.
Not working/disabled encoders
The rest are disabled as i have no way of testing them.
Docker image
I also created an additional docker image built on NVidia CUDA ubuntu, since CUDA is needed for GPU passthrough to cuda, and alpine is incompatible with NVidia drivers