晕 这不是网上的源代码么
CvVideoWriter * writer =cvCreateVideoWriter("test.mjpg",-1, fps,size,1);
这样应该没问题了
CV_FOURCC('M','J','P','G'),
这句 你试一下别的视频模式
I used to have the same issue. I remember turning off one option in project property actually solved this problem.
I will check when I have time.
Having too much video encoder and decoders might result in a failure of fetching video.
Try simply read the video and display, see if that works.