1 cv::VideoWriter::fourcc可支持的视频编码格式

1.1 OpenCV文档

地址:https://docs.opencv.org/3.4/dd/d9e/classcv_1_1VideoWriter.html

OpenCV – cv::VideoWriter::fourcc可支持的视频编码格式-StubbornHuang Blog

在官方文档中给出了一个cv::VideoWriter::fourcc可支持的视频编码格式列表:https://www.fourcc.org/codecs/

下面例举一些常见的编码格式以及对应的CV_FOURCC的写法:

  • cv::VideoWriter::fourcc('P', 'I', 'M', '1') - MPEG-1
  • cv::VideoWriter::fourcc('M', 'J', 'P', 'G') - motion-jpeg
  • cv::VideoWriter::fourcc('M', 'P', '4', '2') - MPEG-4.2
  • cv::VideoWriter::fourcc('D', 'I', 'V', '3') - MPEG-4.3
  • cv::VideoWriter::fourcc('D', 'I', 'V', 'X') - MPEG-4
  • cv::VideoWriter::fourcc('U', '2', '6', '3') - H263
  • cv::VideoWriter::fourcc('I', '2', '6', '3') - H263I
  • cv::VideoWriter::fourcc('F', 'L', 'V', '1') - FLV1
  • cv::VideoWriter::fourcc('A', 'V', 'C', '1') - H264
  • cv::VideoWriter::fourcc('I', '4', '2', '0') - YUV