Ask Your Question

Revision history [back]

VideoCapture.read() error description when returning false

Hi, VideoCapture.read() returns a boolean value indicating success or failure. That is good. But in case of failure, how do I know what went wrong? Is there any way I can access a description of the underlying error? Something like cv2.lastError() or something like that? I'm in the dark many times as of the reason of the error. I usually end up trying to guess, but some description (or at least an error code for a following lookup) would be great to have.

Thank you. Regards.