Ask Your Question

Revision history [back]

OpenCV program for Raspberry PI doesn't write video.

I wrote C++ code for Raspberry PI (OS-Raspbian):

........
cv::VideoWriter outStream("out.mjpeg", CV_FOURCC('M','J','P','G'), 2, cv::Size(320,240), 1);
outStream.write(frame);
outStream.release();
.......

And this doesn't work in current conditions, program doesn't write "out.mjpeg" .The outStream.isOpened() returns 0. I try to use *.avi format and CV_FOURCC('N','O','N','E'), but this still doesn't work. Same code properly works for Windows.

If I use imwrite("out.jpg", frame) RaspberryPI program properly works and write out.jpg

Where is problem?