Frequent Errors When Reading From IP Camera
I'm reading video frames from a Foscam FI9805P camera. My code is in Python.
I'm getting frequent errors when trying to read a frame. Sometimes cap.read() returns an error. Other times I get a warning or error from the opencv/ffmpeg code. (i.e. the error comes from the "system").
My camera object is established with: cap = cv2.VideoCapture('rtsp://<username>:<password>@192.168.1.202:88/videoMain')
I've pasted below an example of what I'm getting. The lines in the format "<date time=""> Error on frame read." are coming from my code. It's what I output when I check for an error after executing cap.read().
A friend who knows a lot more than me is saying there may be something going on with frame rate or something like that.....that a different video setting on the camera might improve this. Or....alternatively.....could this mean the WiFi connection is shaky?
Thanks.
Jim
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
Thu Nov 30 08:44:42 2017 Error on frame read.
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808)
warning: rtsp://TA:[email protected]:88/videoMain (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809)