Thanks for your input!
I simplified my post. Actually here’s what I want to do:
- Process (I assume this means decode) frames and decide, by some metric, whether to crop that frame or not
- If I decide to crop it, then write that frame (encode?) to a new video.
Would ffmpeg still work? (Can I use ffmpeg-python (https://github.com/kkroening/ffmpeg-python) instead?)
How about using OpenCV CUDA’s VideoReader (GPU) for reading, then vanilla OpenCV’s VideoWriter (CPU) for writing?
(This idea is based on how @cudawarped said that v2.cudacodec.VideoWriter() doesn’t work)