videocapture open blocks

asked 2017-09-13 07:45:24 -0500

w.law gravatar image

Hi,

I''m using the VideoCapture class in opencv 2.4.13 in order to display images from an IP camera. I've noticed that when I perform a VideoCapture.open("<address">) and the camera is not available, the function does not seem to return.

I've attempted to compile opencv myself with a modification in "cap_ffmpeg_impl.hpp" on line 196/197:

#define LIBAVFORMAT_INTERRUPT_OPEN_TIMEOUT_MS 30000

#define LIBAVFORMAT_INTERRUPT_READ_TIMEOUT_MS 30000

where I've set the values to 3000 instead. This does not seem to remedy the issue.

Would anyone happen to know how else I could remedy having the VideoCapture.open function blocking?

edit retag flag offensive close merge delete