How to avoid the 4GB file size limit when recording video?
Hello, I am recording a video with a VideoWriter, passing the parameter -1 so the codec select pops up. That only works for AVI files and those have a 4GB file size limit, so my video ends up glitched as I add frames to it.
Is there anyway to avoid this? what codec to install?
I am working on a windows 10 machine.
Thanks,
-- David
try not to use -1, but specify a real codec.
(using -1 will use the outdated vfw graph, not ffmpeg)
I have tried that, the problem is that the AVI container has a maximum size of 4GB, and apparently it is the only way I can record more than 0 bytes. I have also checked the frame size and everything... Is there any way to use MKV as a container, when you use the right video for windows codec with a fourcc?
I have Lagarith and x264vfw, both pop up in the dialog.
How about using the .mp4 container? I have used that for large videos. Combine it with MPEG or XVID codec and it should work just fine.
Yeah, at the end I had to hardcode the codec + specify a "mkv" container by changing the extension.
@Studiosi, You can't use this for windows 10. This will merely worked for Linux
Here is link for only OpenCV 3.0 or later. Videowriter