How to differentiate between not supported and a value of zero in VideoCapture::get

Viewed 29

I am working with the Python bindings for OpenCV, however, I think this problem is also relevant to the C++ interface. If I have the following code:

import cv2

cap = cv2.VideoCapture('/tmp/input.mp4')
ts = cap.get(cv2.CAP_PROP_POS_MSEC)

How do I differentiate between ts == 0.0 meaning a position of zero milliseconds vs. operation not supported?

0 Answers
Related