How to output x265 compressed video with cv2.VideoWriter
As far as I know, OpenCV VideoWriter has no support for HEVC encoding (yet). I recommend you using FFmpeg as sub-process, and PIPE the rendered frames to stdin input stream of ffmpeg. You may use Python binding for ffmpeg like ffmpeg-python, or execute ffmpeg using Python subprocess. Using ffmpeg, you have much more control over … Read more