static-ffmpeg icon indicating copy to clipboard operation
static-ffmpeg copied to clipboard

[Enhancement] Support for CUDA

Open ToshY opened this issue 1 year ago • 6 comments

I was trying to run FFmpeg and passing --gpus all flag to the docker container, just to realise that the image does not support it yet (which I later read in the "todos" section in the README).

Any chance to compile FFmpeg with CUDA?

https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html#compiling-for-linux


If you do not have time to do it yourself, I can try to take a shot at it (but it might take me a while to understand and fix it). Let me know.

ToshY avatar Jul 02 '24 22:07 ToshY

Hey, yes that would be nice to support. I've only briefly looked at it some years ago but then concluded that at least for some of the GPU and CUDA libraries it didn't seem possible to produce a static binary. But please if you feel motivated have a look again and see how it looks!

wader avatar Jul 03 '24 08:07 wader

Now i remembered another possible issue: libs not linked with musl might be challenging.

wader avatar Jul 03 '24 10:07 wader

Can also Intel drivers be added for Intel ARC GPUs transcoding acceleration?

@examedia-video-engineering Hello, i have no experience using them but if the software needed is open source, can be built with musl libc and be link statically it should be work. Want to look into it? either do a PR or do research what packages would be needed and so on. I'm happy to help out.

wader avatar Aug 09 '24 06:08 wader

Sounds good, i'll gather Intel ARC driver information, add it to your Dockerfile to test, and will report back if it works.

Off topic: What would you reccomend to troubleshoot docker build ? If there's an error with "checkdupsym" for example. Any way to open up alpine build docker and shell into it?

👍 When working on something i usually take the Dockerfile and strip out everything unrelated and also strip away everything after building ffmpeg, this way the build state kept and also have a shell. Now build the image and run it to get a dev env. In your case i think you can strip all tests for now, including checkdupsym. checkdupsym should only be needed to check for dup syms for rust based libraries.

wader avatar Aug 09 '24 17:08 wader