Howdy,
I am using the VideoWriter class to capture video from a camera to a file. I am doing CV in the code as well, of course, but am adding video capture to help troubleshoot and optimize.
I am able to capture the video if I pass the magic number "-1" as the fourcc parameter, like so:
outputVideo = new cv::VideoWriter(outputVideo_name, -1, 20, img_rgb.size(), true);
I select "Microsoft Video 1" from the dropdown and it generates a video file using the CRAM codec.
However, if I replace that "-1" with "CV_FOURCC('C','R','A','M')", it says it's capturing video but the file is always 6kB and does not play. Using MSVC or WHAM produces similar results.
I am running on Windows 7 with a PS3 Eye camera using the CL-Eye driver and OpenCV 2.4.1, compiled with Eclipse and MinGW's g++ (GCC) 4.5.2.
Any ideas on what I might be doing wrong?
Thanks,
Nathan