Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You should have ffmpeg and the x264 libraries installed.

sudo apt-get install ffmpeg x264 libx264-dev

Also for mp4.

fourcc = cv2.CV_FOURCC(*'mp4v') or fourcc = cv2.CV_FOURCC(*'mp4v2')

or

fourcc = cv2.CV_FOURCC(*'MP4V')

For X264.

out = cv2.VideoWriter_fourcc((*'X264')