Answer the question
In order to leave comments, you need to log in
How to run ffmpeg on GPU golang?
I am converting video with ffmpeg on the fly. Because of this, a very large load on the CPU
Is it possible to run ffmpeg on the GPU?
Now I'm running with
exec.CommandContext()
Answer the question
In order to leave comments, you need to log in
This is more of a ffmpeg question, go has nothing to do with it at all.
GPU encoding is enabled by parameters passed to ffmpeg.
For different GPU manufacturers, the parameters will be different.
For example, here is the Cuda doc: https://docs.nvidia.com/video-technologies/video-c...
1) This usually makes sense if the full processing cycle is on the video card. Otherwise, you risk spending more time on data transfer than on encoding.
2) It is highly likely that you will have to rebuild ffmpeg with support for nvenc or whatever card you have.
Absolutely the same as on the CPU - by calling ffmpeg with the necessary command line arguments as a child process.
A good place to start reading the documentation is https://trac.ffmpeg.org/wiki/HWAccelIntro
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question