user239457
user239457

Reputation: 1876

How to get the total time in seconds of a video in opencv

Is there any CAP_PROP_* to find the total time in seconds of the video ? Or do I have to divide total frames by fps?

Upvotes: 2

Views: 1896

Answers (1)

Shashank Singh
Shashank Singh

Reputation: 657

Check out this link.

You can also get the length of the entire video in seconds from CV_CAP_PROP_FPS and CV_CAP_PROP_FRAME_COUNT.

Upvotes: 2

Related Questions