OpenCV grabber loop mode & duration
Summary
The loop mode doesn't work on opencv grabber. It seems that the duration calculation is wrong.
Steps to reproduce
Play a video (other than avi files) , enable the loop mode, video stop at the end.
Check also the duration of the video in VLC (the app) and compare it to the duration coming from opencv grabber.
Dev environment
- all
Relevant logs and/or screenshots
Possible fixes
-
duration calculation:
(nbframes * fps)
to have the duration in sec of the video, and then*1000
to have ms. -
Loop mode: check opencv options
::cv::CAP_PROP_POS_FRAMES
>=::cv::CAP_PROP_FRAME_COUNT