Ask Your Question
0

Frequent Errors When Reading From IP Camera

asked 2017-11-30 09:56:56 -0600

Haselmaier gravatar image

updated 2017-11-30 10:00:14 -0600

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)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-12-02 17:26:29 -0600

Haselmaier gravatar image

I think I've discovered the source of this issue. I'll put this follow-up as an Answer in case it impacts others.

Basically I think I was overburdening the camera. In addition to my OpenCV-based code that was gathering data from the camera, I had other clients streaming off of the same camera: * An instance of iSpy that was capturing all movement for a given area. (I was using iSpy to capture events so it was easy for me to compare how my software was analyzing those same events.) * I'd typically have a browser pointed to the same camera - so I could easily monitor in real time what was happening and modify camera settings. * I had another machine in the house also taking a stream from that camera.

I think basically that camera had too many clients to stream to. When I shut down all those ancillary clients the read error rate for my software went way down.

Jim

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-11-30 09:56:56 -0600

Seen: 1,314 times

Last updated: Dec 02 '17