New problem - camera goes red

Forum for questions and support relating to the 1.26.x releases only.
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: New problem - camera goes red

Post by TheKorn » Sun Jan 19, 2014 1:22 pm

basketcase wrote:Any suggestions?
I'm kind of wondering why nobody has mentioned checking logs and/or enabling debugging on zmc during this whole thread. Those would be my #1 and #2 stops!

(Actually, I'd enable debugging on zmc for that camera only just so I didn't overrun things with debug info on cameras that are just fine!)

Though I have to say, good job on the workaround hack. But I, too, think it's likely wallpapering over the true problem so is probably worth more analysis.

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: New problem - camera goes red

Post by basketcase » Sun Jan 19, 2014 10:05 pm

How do I add it for one cam only?
Is this the option in config?
LOG_DEBUG Switch debugging on (?)
LOG_DEBUG_TARGET What components should have extra debug enabled (?)

I've not used it before, the standard logging isn't really telling, it just floods the logs with unable to read packet.

Code: Select all

2014-01-20 07:55:51.206866	zmc_m4	28373	ERR	Unable to read packet from stream 0: error -1	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp	215
2014-01-20 07:55:51.063274	zmc_m4	28373	ERR	Unable to read packet from stream 0: error -1	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp	215
2014-01-20 07:55:48.644795	zmc_m4	28373	INF	Bk_Yard: 2000 - Capturing at 16.95 fps	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp	2783
2014-01-20 07:54:49.937531	zmc_m4	28373	INF	Bk_Yard: 1000 - Capturing at 16.95 fps	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp	2783
2014-01-20 07:53:50.249367	zmc_m4	28373	INF	Priming capture from rtsp://192.168.0.25/user=admin_password=pw_channel=1_stream=0.sdp?real_stream?tcp	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp	112
2014-01-20 07:53:50.205278	zmc_m4	28373	INF	Starting Capture	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zmc.cpp	195
You can see it lasts 1 minute before it craps out...

TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: New problem - camera goes red

Post by TheKorn » Tue Jan 21, 2014 4:44 am

basketcase wrote:How do I add it for one cam only?
Is this the option in config?
LOG_DEBUG Switch debugging on (?)
LOG_DEBUG_TARGET What components should have extra debug enabled (?)
OK, so you need to turn on debugging for zmc (zoneminder capture), for monitor 4 only...

From the web, click on options, then on logging.

Make sure "log level database" is NOT set to debug. We're going to be cranking through a lot of debug info, no need to give mysql a heart attack here; a flat file will be just fine.

Turn on LOG_DEBUG (....duuuhhh. :D )
LOG_DEBUG_TARGET ... here's where the magic happens. If you put in just "_zmc" into there, it'd log capture info for all your monitors. Don't want that, since only one is misbehaving. So instead put in "_zmc_m4" to only do debug info for monitor 4.

Set LOG_DEBUG_LEVEL to 9. (everything plus kitchen sink)

Restart zoneminder.

Go to the directory pointed at by LOG_DEBUG_FILE. On my system, that's /tmp/zm/ , and I had to su before I could get there.

Once there, list the files and it should be obvious which one you want to look at. (It'll have "debug" in the name. :D )
I've not used it before, the standard logging isn't really telling, it just floods the logs with unable to read packet.

Code: Select all

2014-01-20 07:55:51.206866	zmc_m4	28373	ERR	Unable to read packet from stream 0: error -1	/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp	215
[/quote]

Yeah, sometimes you get lucky and there's a nugget of goodness in the regular log files.  Not this time, so time to turn on debugging.

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: New problem - camera goes red

Post by basketcase » Tue Jan 21, 2014 11:43 am

TheKorn!

Thanks for the reply, so that all went without a hitch... monitor failed as per usual.

I'll spare you the 1MB of text the file generated in 60 seconds

Code: Select all

01/21/14 21:24:37.409925 zmc_m4[1644].DB1-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp/2652 [Loaded monitor 4(Bk_Yard), 1 zones]
01/21/14 21:24:37.409941 zmc_m4[1644].INF-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zmc.cpp/195 [Starting Capture]
01/21/14 21:24:37.458556 zmc_m4[1644].INF-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/112 [Priming capture from rtsp://192.168.0.25/user=admin_password=*_channel=1_stream=0.sdp?real_stream?tcp]
01/21/14 21:24:43.213285 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:24:43.228974 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 0]
01/21/14 21:24:43.228996 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 0]
01/21/14 21:24:43.233890 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:24:43.238734 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1]
01/21/14 21:24:43.238778 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1]
01/21/14 21:24:43.242602 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:24:43.247146 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 2]
01/21/14 21:24:43.247171 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 2]
01/21/14 21:24:43.250900 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:24:43.255638 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 3]
01/21/14 21:24:43.255662 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 3]
01/21/14 21:24:43.259357 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:24:43.264344 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 4]
01/21/14 21:24:43.264366 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 4]
... etc
1015 frames later...

Code: Select all

01/21/14 21:26:37.495427 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1019]
01/21/14 21:26:37.495443 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1019]
01/21/14 21:26:37.649193 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:26:37.663481 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1020]
01/21/14 21:26:37.663495 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/[h264 @ 0x6130c50]missing picture in access unit
ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1020]
01/21/14 21:26:37.725006 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:26:37.733040 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1021]
01/21/14 21:26:37.733065 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1021]
01/21/14 21:26:37.885627 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:26:37.890135 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1022]
01/21/14 21:26:37.890153 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1022]
01/21/14 21:26:37.966553 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:26:37.973996 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1023]
01/21/14 21:26:37.974019 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1023]
01/21/14 21:26:38.053112 zmc_m4[1644].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:26:38.062965 zmc_m4[1644].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1024]
01/21/14 21:26:38.063003 zmc_m4[1644].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1024]
01/21/14 21:26:38.069319 zmc_m4[1644].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:26:38.124340 zmc_m4[1644].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:26:38.166184 zmc_m4[1644].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:26:38.207892 zmc_m4[1644].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]

So there's something at frame 1020, now I did the test again shortly after and almost the same frame again with the [h264 @ 0x6992c50]missing picture in access unit

Code: Select all

01/21/14 21:39:05.831370 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1016]
01/21/14 21:39:05.905522 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/[h264 @ 0x6992c50]missing picture in access unit
14 21:39:05.912365 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1017]
01/21/14 21:39:05.912421 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1017]
01/21/14 21:39:06.046809 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.053582 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1018]
01/21/14 21:39:06.053608 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1018]
01/21/14 21:39:06.150811 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.160836 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1019]
01/21/14 21:39:06.160862 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1019]
01/21/14 21:39:06.305365 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.319448 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1020]
01/21/14 21:39:06.319473 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1020]
01/21/14 21:39:06.384096 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.390857 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1021]
01/21/14 21:39:06.390887 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1021]
01/21/14 21:39:06.544293 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.553099 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1022]
01/21/14 21:39:06.553129 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1022]
01/21/14 21:39:06.624021 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.629939 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1023]
01/21/14 21:39:06.629956 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1023]
01/21/14 21:39:06.743608 zmc_m4[2176].DB5-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/218 [Got packet from stream 0]
01/21/14 21:39:06.752807 zmc_m4[2176].DB4-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/224 [Decoded video packet at frame 1024]
01/21/14 21:39:06.752827 zmc_m4[2176].DB3-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/228 [Got frame 1024]
01/21/14 21:39:06.756496 zmc_m4[2176].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:39:06.821165 zmc_m4[2176].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:39:06.862916 zmc_m4[2176].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]
01/21/14 21:39:06.904764 zmc_m4[2176].ERR-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_ffmpeg_camera.cpp/215 [Unable to read packet from stream 0: error -1]

Hopefully that makes sense to someone

Cheers again for the assistance.

TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: New problem - camera goes red

Post by TheKorn » Tue Jan 21, 2014 2:36 pm

Happy to help! I can't do much, but I do what I can!

We're a bit above my pay scale here, but it looks like ffmpeg isn't passing a frame to zoneminder, for whatever reason. Why that's happening I couldn't even begin to speculate.

Don't forget to turn off debugging and restart zoneminder. ;) Also remember to move that debug file out of /tmp , in case you want/need to reference it later.

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: New problem - camera goes red

Post by basketcase » Tue Jan 21, 2014 9:03 pm

Yeah, I've restored it all to normal, I noticed this too

Code: Select all

01/21/14 21:37:05.946859 zmc_m4[2176].DB1-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp/381 [mem.size=46081760]
01/21/14 21:37:05.946878 zmc_m4[2176].DB1-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp/405 [Unable to map file /dev/shm/zm.mmap.4 (46081760 bytes) to locked memory, trying unlocked]
Seeing as on both runs it stopped at 1024 frames made me think possible memory error

I re-ran the test on m3 the identical camera, it has the same line, but no frame errors and works flawlessly.

Code: Select all

01/22/14 06:57:11.722832 zmc_m3[19626].DB1-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp/381 [mem.size=46081760]
01/22/14 06:57:11.722851 zmc_m3[19626].DB1-/home/abauer/rpmbuild/BUILD/ZoneMinder-1.26.5/src/zm_monitor.cpp/405 [Unable to map file /dev/shm/zm.mmap.3 (46081760 bytes) to locked memory, trying unlocked]


Hopefully some of the more worldly ZM pro's can decipher this one

biboun
Posts: 9
Joined: Sat Jan 04, 2014 3:45 pm

Re: New problem - camera goes red

Post by biboun » Fri Jan 24, 2014 9:48 am

Strangely one of my cam makes randomly red frames (less since i replaced wifi with PLC), but it always recovers.
It is a foscam clone using http protocol (mjpeg stream).

I know knowing that won't help, and probably rtsp is required to have the issue buth here is my 2 cents:

For detection, a red frame comes out with a 100 score.
If you run actions based on detection, you can at least easily ignore 100 score images and more generally 100 average score events so you don't catch those false alarms.

Of course you still need to solve the original problem so red frames are only intermittent and don't kill the stream definitely.

iitywygms
Posts: 118
Joined: Thu Nov 08, 2012 5:19 am

Re: New problem - camera goes red

Post by iitywygms » Fri Jan 24, 2014 3:49 pm

biboun wrote:Strangely one of my cam makes randomly red frames (less since i replaced wifi with PLC), but it always recovers.
It is a foscam clone using http protocol (mjpeg stream).

I know knowing that won't help, and probably rtsp is required to have the issue buth here is my 2 cents:

For detection, a red frame comes out with a 100 score.
If you run actions based on detection, you can at least easily ignore 100 score images and more generally 100 average score events so you don't catch those false alarms.

Of course you still need to solve the original problem so red frames are only intermittent and don't kill the stream definitely.
Just wanted to add that I have the same exact issue. Same protocol. I have 6 identical cameras and only 1 has this behaviour.

raymonvdm
Posts: 20
Joined: Thu Jan 16, 2014 3:01 pm

Re: New problem - camera goes red

Post by raymonvdm » Wed Jan 29, 2014 7:22 pm

I also have this same issue when using a Linksys WVC200 camera using the following url

Code: Select all

remote host: username:password@192.168.110.81
remote path: /img/snapshot.cgi?size=3&quality=1

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: New problem - camera goes red

Post by basketcase » Thu Jan 30, 2014 2:33 am

I was testing another camera today that doesn't have this problem at all, but as I switched it's cable from the tester inside the house to it's new home outside it not surprisingly also went red as it was unplugged.

Once plugged in outside, remained red for 15 minutes or so until I restarted its stream within ZM, by disabling then re-enabling that monitor. Within that time the camera was online happy as a clam as checked on it's own webpage but ZM was still spamming my logs with cannot find stream...

roadster
Posts: 18
Joined: Thu Dec 26, 2013 4:15 pm

Re: New problem - camera goes red

Post by roadster » Thu Jan 30, 2014 12:32 pm

Here camerapictures turn red when someone changes resolution in the webinterface of the camera and zoneminder is set on a different resolution than the webinterface

josesuero
Posts: 2
Joined: Mon Jan 27, 2014 2:14 pm

Re: New problem - camera goes red

Post by josesuero » Thu Jan 30, 2014 7:18 pm

As someone suggested I tried to compiling ffmpeg from source to the newests available, and still have the same issue as many of you describe, anyone has got any other ideas??

josesuero
Posts: 2
Joined: Mon Jan 27, 2014 2:14 pm

Re: New problem - camera goes red

Post by josesuero » Fri Jan 31, 2014 3:20 am

I'm took the same approach as Basildane, changed zm_monitor.cpp line 2793

From:
if ( true ) {

if ( capture_image->Size() != camera->ImageSize() )
....

To:

if ( captureResult == 1 ) {

if ( capture_image->Size() != camera->ImageSize() )

Is basically the same thing, if it failed to receive and decode an image, die

I've been testing it for a couple of hours and is "working", whenever there's a problem it dies, a some point it restarts, and all goes back to normal.

This isn't really a permanent fix, it would be ideal to know how to keep receiving images if one fails as oppose to killing the entire process.

It would also be interesting to test what would happen if you configure an invalid source, it would most likely keep dying indefinitely (the horror).

Also frontend (index.php?view=watch) needs to adapt to process changing in case the user is currently watching the feed, closing and opening the window fixes it, some javascript to restart when an error (socket not found) is detected, but again this are all temporary patches and not a real solution.

we still need help finding a solution

kristoffer
Posts: 15
Joined: Thu Mar 06, 2014 5:18 pm

Re: New problem - camera goes red

Post by kristoffer » Wed Mar 19, 2014 6:25 pm

I've been having some stability issues with ffmpeg reading rtsp streams; seems to be similar problems as other ppl in this thread.
I've posted my way of fixing it at http://www.zoneminder.com/forums/viewto ... =9&t=22024

mabene
Posts: 13
Joined: Tue Dec 24, 2013 1:06 pm

Re: New problem - camera goes red

Post by mabene » Thu Mar 20, 2014 4:47 pm

kristoffer wrote:I've been having some stability issues with ffmpeg reading rtsp streams; seems to be similar problems as other ppl in this thread.
I've posted my way of fixing it at http://www.zoneminder.com/forums/viewto ... =9&t=22024
Thanks for that patch!
I'm running zoneminder on Ubuntu 12.04 LTS with stock ffmpeg; I had to take out the calls to av_err2str though, the function doesn't seem to exist.
I also observed that ffmpeg rtsp h264 stream would stay offline after network disconnect / change of camera configuration. With the patch in place, the stream recovers nicely both for events and live view.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest