Problem with cvCreateVideoWriter in OpenCv. Again )
Posted
by lyuba
on Stack Overflow
See other posts from Stack Overflow
or by lyuba
Published on 2010-05-30T23:09:02Z
Indexed on
2010/05/30
23:12 UTC
Read the original article
Hit count: 796
I know, that the issue had been widely discussed before, but after 5 hours of inefficient googling I guess I deserve to ask :) By the way, all such problems concerned earlier versions of OpenCV, so..
I've compiled fresh OpenCV 2.1. from source under Ubuntu 9.10. It works fine except of cvCreateVideoWriter, which returns null to the following request:
CvVideoWriter *writer = cvCreateVideoWriter("video.avi",
CV_FOURCC('M','J','P','G'), fps, size, 0);
I've walked through the OpenCv folders - it even seems to have ffmpeg inside. I've also installed it on the system to make sure. I've changed CV_FOURCC('M','J','P','G') to -1 - all worthless.
I would appreciate your help soo much!
P.S. I've also explored some new way for writing videos here: http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#videowriter But it fails to work as well, showing the mistake:
error: no match for ‘operator>>’ in ‘writer >> frame’
My code is here: http://pastie.org/984734
© Stack Overflow or respective owner