4 ms·
I do have some experiences on the linux side of this. You can compile ffmpeg with support for a bunch of hardware encoders such as nvidia's nvcuvid/nvenc and in
by uniqueuid 4y ago
I do have some experiences on the linux side of this.
You can compile ffmpeg with support for a bunch of hardware encoders such as nvidia's nvcuvid/nvenc and intel's quicksync and so on. The build script is perhaps a hundred lines, so you want to make sure that you don't build that too often and keep working binaries around.
The speedup on nvidia cards is amazing, both for the faster h.264 and h.265 (no experience with others). Note that nvidia cards to have two distinct limits: The number of hardware encoding engines on your card and the number of simultaneous streams they will allow. quadro / professional cards often have unlimited streams but similar numbers of encoders, so they are more flexible but not necessarily faster.
At least from my testing on pascal generation cards, simultaneous encodes are not faster than serial ones because the encoding speed is split. So if you're batching, go ahead and do it serially to keep things simpler.
If you're doing machine learning on video, there is a nifty library called "decord" which does gpu-accelerated decoding and zero-copy reading of frames to your dl framework. That can be nice, but remember that (1) your video samples may blow up the GPU ram if the file is too large and (2) keeping lots of video/frames on the GPU will limit the amount of memory available to your networks. In addition, it may actually be faster to do decoding on the CPU because you then use both a fast CPU and the GPU simultaneously. YMMV.
- Asooka 4y agoDo you know if you can use Intel's on-CPU video decoders concurrently with an nVidia GPU? At least last time I tried that on Windows it wasn't possible to use QuickSync while also having a discrete GPU plugged into the machine, or at least no easy way to enable it.
- uniqueuid 4y agoI haven't tried it, and to be honest, I do not see a large need to. The nvidia encoders are typically much faster and have higher quality. My experiments with quicksync were not very favorable (though that was some generations ago).