Ask Your Question

megab's profile - activity

2019-03-03 11:53:51 -0600 received badge  Student (source)
2019-02-03 05:48:22 -0600 received badge  Popular Question (source)
2016-12-07 18:51:08 -0600 commented question puttext N decimal places

what programming language do you use ?

2016-12-07 18:51:08 -0600 asked a question Change FPS on video capture from file

I'm reading a video file, and it's slower than the actual FPS of the file (59 FPS @1080p) even if i'm not doing any processing to the image:

       using namespace cv;
       using namespace std;
       // Global variables
        UMat frame; //current frame
        int main(int argc, char** argv)
        {

                VideoCapture capture("myFile.MP4");
                namedWindow("Frame");
                capture.set(CAP_PROP_FPS, 120); //not changing anything
                cout>>capture.get(CAP_PROP_FPS);
                while (charCheckForEscKey != 27) {

                       capture >>frame;
                if (frame.empty())
                    break;
                imshow("Frame", frame);

                }

    }

Even if I tried to set CAP_PROP_FPS to 120 it doesn't change the fps of the file and when I get(CAP_PROP_FPS) I still get 59.9...

When I read the video the actual outcome is more or less 54 FPS (even using UMat).

Is there a way to read the file at a higher FPS rate ?

Thanks in advance