Ask Your Question

Revision history [back]

I know this is really old but if anyone is interested I believe there is an issue with OpenCV and codecs if you have used a prebuilt version of opencv from pip or conda.

My solution is to use the XVID codec and then convert with a shell command after VideoWriter has finished.

Not elegant but it gets you the file type you desired.