Videowriter recording MP4 + X264 (OpenCV 3.1)
I'm trying to record a video with the X264 codec and MP4 format. The resulting video recording works, and can be played with a videoplayer, however I receive following warning.
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/'!???'
I've been looking in the OpenCV code and it looks that a fallback mechanism is used (and another tag is used instead). Can someone tell me why this is happening, and how I can remove the warning.
https://github.com/opencv/opencv/blob...
Thanks! Cédric
which fourcc / format did you try ?
can you try with another format(container), like .avi ?
see here for the tag enum
I used this CV_FOURCC('X','2','6','4'). I've tried it with other containers (mkv and avi), and I can confirm that it works. However the reason I want to use MP4, is because if I use the containers (mkv or avi), it doesn't get displayed in the HTML5 video element (in Safari and Firefox); though Chrome can handle it.
Therefore I prefer to have the MP4 container, as this works in all browsers (Firefox, Safari, and Chrome).
sure, i see. so it used H263P instead of H264.
Should I just swap the FOURCC with H263 or is it something else? FYI I compiled FFMPEG with h264 support.
if I replace the fourcc by 0x00000021 the error goes away, but still not clear what this codec is?
Looks like someone used the same trick: http://www.qiku.es/pregunta/433708/es....