0

I am running OpenCV on an ARM A9 processor. I am trying to use MJPEG so my C920 webcam runs a lot faster. The beginning of my program is as follows:

VideoCapture cap(CV_CAP_ANY);
cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('M', 'J', 'P', 'G'));
cap.set(CV_CAP_PROP_FRAME_WIDTH, 640);
cap.set(CV_CAP_PROP_FRAME_HEIGHT, 480);

The programs compiles, however, the following error appears when I run it:

HIGHGUI ERROR: V4L: Property <unkown property string>(6) not supported by device

I am completely clueless on what to do. Does anyone have an idea of why this error is occurring?

Stefan G.
  • 167
  • 7
  • Have you tried some other codec? Have you tried using `cap.get(..)` to see what `FOURCC` it returns? – a-Jays Jul 29 '14 at 08:29
  • I have not as the point of MJPEG was dramatically increase speed. I will do that though and see the results – Stefan G. Jul 30 '14 at 06:05
  • cap.get(CV_CAP_PROP_FOURCC) returns a 0. I'm not quite sure what that means – Stefan G. Jul 30 '14 at 13:30
  • This happens both before and after I use cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('M', J', 'P', 'G')); – Stefan G. Jul 30 '14 at 13:40
  • Ok, it seems beyond me. The only place I've successfully used FOURCC is in writing a video to a file. So I doubt if (all) cameras support changing their stream codec by commands. `set()` function is not guaranteed to work for every property it lists. I suppose it has to be possible in the first place. – a-Jays Jul 31 '14 at 07:40

0 Answers0