Ask Your Question

Revision history [back]

Look at this page:

http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture

Then scroll for the function VideoCapture::set

  • Choose parameter CV_CAP_PROP_FOURCC
  • You can set it to whichever encoder that is used in your video

Retrieve four_cc codes at : http://www.fourcc.org/codecs.php