Ask Your Question
0

CV_CAP_PROP_POS_FRAMES not working w/iOS

asked 2014-09-16 10:09:48 -0600

LGS gravatar image

updated 2015-01-11 06:44:18 -0600

I developed a project where I am supposed to read frames from a video file. In my case, a .mov file straight from an iPhone capture.

This application is supposed to work on both Mac OS X and iPhone.

Unfortunately, seeking into the file does not work with iOS although it works with Mac OS (each build is linked to its proper OpenCV framework).

In the following code, setting frame always starts file from the begining, and get always returns 1, although frames are actually seeked properly as I displayed them.

Maybe it is just that iOs OpenCV framework is not at the same features levels as the Mac OS one ?

VideoCapture *videoCapture = nil;
videoCapture = new VideoCapture(filePath);
videoCapture->set(CV_CAP_PROP_POS_FRAMES, numframe);

...
loop
    videoCapture->read(grabbedFrame);
    int numframe = videoCapture->get(CV_CAP_PROP_POS_FRAMES);

....

Notes :

  • Currently my target is iOS simulator. Did not checked yet w/ real iPhone

  • I have the same behaviour for MSEC and FRAMES modes.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-11 02:36:37 -0600

RicIp gravatar image

updated 2015-01-11 02:41:30 -0600

I have the same problem when tested with iPhone 5S. With iOS VideoCapture.set does not work with any CV_CAP_PROP_? option. Anyone knows why the framework does not support this? Is it to expect that this will be fixed in future versions?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-09-16 10:09:48 -0600

Seen: 471 times

Last updated: Jan 11 '15