Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3 + x264 + FFmpeg

I've seen this post here, but I think I'm having a different problem with the said combo. Code:

cv::VideoWriter writer(output_path.string(), CV_FOURCC('X','2','6','4'), 60, frame_size);

Output:

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/'!???'

The video produced is unreadable. The FFmpeg I have is packaged by ubuntu maintainers, and it lists it was configured with "--enable-libx264". I made a repost here on SO. Any idea how I can make this combination work? Is it an OpenCV bug, FFmpeg bug, or neither?