Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+36 votes
asked in CSC285_Fall2018 by (1 point)

1 Answer

+15 votes
Best answer

If you mean the number of frames, then that question has already been answered here:


If you want the duration in seconds, then you can take the number of frames (see previous answer) and divide the number of frames by the framerate (in frames per second), which I think you can get by doing:


where vidCap is an opencv VideoCapture object.

answered by (508 points)
selected by