You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
videoCapture in iOS returns 1 for all properties #6450
Code example to reproduce the issue / Steps to reproduce the issue
Please try to give a full example which will compile as is.
#import <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int Tracking::processFile(string fileIn)
{
VideoCapture cap(fileIn); // open the video file for reading
if ( !cap.isOpened() ) // if not success, exit program
{
cout << "Cannot open the video file: " << fileIn << endl;
return -1;
}
else{
cout << "File Open " << fileIn << endl;
}
double dFps = cap.get(CAP_PROP_FPS); //get the frames per seconds of the video
cout << "Frames per second = " << dFps << endl;
double dWidth = cap.get(CAP_PROP_FRAME_WIDTH); //get the width of frames of the video
double dHeight = cap.get(CAP_PROP_FRAME_HEIGHT); //get the height of frames of the video
cout << "Frame Size = " << dWidth << "x" << dHeight << endl;
Size frameSize(static_cast<int>(dWidth), static_cast<int>(dHeight));
double dFrameCount = cap.get(CAP_PROP_FRAME_COUNT);
cout << "Frame count = " << dFrameCount << endl;
return 0;
}
Reacted by AmineG, Misha Nastenko, Kanehekili, voiz.x and yizhaoyanbo
Activity
logic1988 commentedon Sep 23, 2016
I got the same problem in iOS, anybody had the easy way to solve it?
yijiasu commentedon Jan 18, 2017
This problem is still unfixed
davidfant commentedon Jul 20, 2018
Has anyone figured this out?
hannesoud commentedon Jul 30, 2018
I am getting same issue. Anyone figured this out ?
nastenkomisha commentedon Aug 6, 2018
The same problem. Any plans to fix it?
maja3d commentedon Jan 29, 2019
It returns 1 for this property CAP_PROP_FRAME_COUNT
Please fix
Fix issue opencv#6450
Fix issue opencv#6450
mshabunin commentedon Sep 25, 2019
Please check the fix from PR #15464
Fix issue opencv#6450