I'm using OpenCV 3.3 in a Python 3.6 environment on a 64-bit Windows 10 platform. I want to save videos at a fairly high compression rate, but can't seem to find the right codec. The ability to choose a codec to write videos using ffmpeg320_64.dll seems somewhat limited. Although OpenCV can read videos that were encoded with almost any codec, the codecs available for writing videos seems somewhat limited. I understand that there are license issues between ffmpeg and OpenCV. I also understand that I can make a ffmpeg320_64.dll with the codecs I want,but I prefer not going down that path.
I can read an 49MB 48-second MP4 (avc1 codec) file from a camcorder. When I write that same video using OpenCV and "DIVX", "XVID", or "MPEG" codecs, the output file is over 150MB. I cannot find any other codecs available for writing videos.
- Is there a list of codecs that I can use when using OpenCV "out of the box"?
- Is there a parameter I can set to control the compression ration when writing videos? (I can afford some quality loss. I want files size of the the written video to be no larger than the source video.)