http://ellenberger.blog.163.com/blog/static/88796664200891711120835/
实现此操作时走了很多错路,两个函数的用法也不是很复杂,关键问题是去了解OpenCV的机制。经过这几天的学习,OpenCV搜索系统编解码器。
使用cvCreateVideoWriter时,在其参数中必须指定编码方式。
cvCreateVideoWriter
创建视频文件写入器
typedef struct CvVideoWriter CvVideoWriter;
CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc, double fps, CvSize frame_size, int is_color=1 );
filename
输出视频文件名。
fourcc
四个字符用来表示压缩帧的