I tried using codes
VideoWriter oVideoWriter("index.mp4", VideoWriter::fourcc('X','2','6','4'), frames_per_second, frame_size, true);
VideoWriter::fourcc('X','2','6','4')
VideoWriter::fourcc('m','p','4','v')
VideoWriter::fourcc('M','P','4','V')
VideoWriter::fourcc('A','V','C','1')
VideoWriter::fourcc('a','v','c','1')
VideoWriter::fourcc('M','J','P','G')
I get error:
OpenCV: FFMPEG: tag 0x34363258/'X264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x00000021/'!???'
What FOURCC codec should I use for mp4?
User contributions licensed under CC BY-SA 3.0