Feature Request: Make Use of NVIDIA Hardware Video Decoding/Encoding with FFmpeg
Just a quick feature request and thought for future releases...
At the moment, we process high def (4K/5K) videos using Faceswap - for both (mainly) extraction and sometimes conversion.
The bottleneck seems to be FFmpeg decoding (or decoding and encoding for convert) the video frames and passing them to the extract/convert process. Most of what we process are in H265 (HEVC) format and relying on the CPU is super-duper-slow.
I know it's a challenge and may take some redesigning as the extract/convert process also uses the GPU and reserves all GPU memory (if allow growth is not enabled) but perhaps there could be some kind of sharing going to enable FFmpeg to use its GPU functionality too. Share and share alike
It's painfully slow using the included CPU-bound version of FFmpeg (especially extraction). However, the CPU is nowhere near utilized fully (especially on our machine) so maybe an off branch of this request would be to increase FFmpeg threads - for example, 4+ instances (or user-specified) of FFmpeg grabbing video frames in a set order in order to utilize the CPU to its full potential.
I feel this would greatly improve speeds with both extraction and conversion (at least for our HEVC encoded stuff anyway).
Perhaps we are a fringe case and there isn't much interest in this but thought we'd share the idea.
Thank you in advance.