Camera gets blue every few days

Forum for questions and support relating to the 1.29.x releases only.
Locked
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Camera gets blue every few days

Post by mattionline »

Hello,

i have the following issue:

Every few days just one camera get's a blue screen in the live view.
The fps rate increases extremely because zoneminder cant fetch the stream.

"Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size"

When i go to the camera webinterface (Foscam FI9805P) i can view the live stream and the width/height/resolution settings were also correct (960p).
Normally if a blue picture appears the resolution is set incorrectly but this isn't the case.

Then i tried out to reconnect the camera "manually" into zoneminder. So i clicked on the source of the camera, changed absolutely nothing and saved. After that the picture of the camera appears correctly.
Could it be that zoneminder can't connect to the camera or does the rtsp stream broke up?
Normally i can exclude the stream because it works instantly after i reconnect via the source save button.

How is it possible to test if the rtsp stream is available? If i copied the settings and pasted them into vlc i can't get the stream, also when the camera is connected into zoneminder and the image is available. (i tried rtsp://USER:PW@192.168.1.3:88/videoMain in vlc)

I installed ZM from iconnors ppa and i have 16.04 LTS.
Here are my source settings:

ffmpeg
no fps settings

rtsp://USER:PW@192.168.1.3:88/videoMain
rtp/rtsp
32 bit color
1280
960

It would be very nice if you have an idea what i can check to solve this problem.
Thanks in advance


UPDATE:

when the camera disconnected

2016-07-07 16:07:01.327190 zmc_m1 5420 ERR Unable to read packet from stream 0: error -541478725 "End of file". zm_ffmpeg_camera.cpp

2016-07-07 16:07:01.339011 zma_m1 13985 WAR Signal: Lost zm_monitor.cpp

2016-07-07 16:07:01.352979 zmc_m1 28427 ERR Unable to open input rtsp://USER:PW@192.168.1.3:88/videoMain due to: Connection reset by peer zm_ffmpeg_camera.cpp

and then the buffer overrun post a few hundred times (the fps increases extremely with the blue picture):

2016-07-07 16:07:01.369865 zmc_m1 5420 WAR Buffer overrun at index 21, image 1774871, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp

2016-07-07 17:05:02.021473 zms 29678 ERR Terminating, last frame sent time 1467903901.521387 secs more than maximum of 10.000000 zm_monitor.cpp

2016-07-07 17:12:09.272568 zmc_m1 29642 ERR Unable to read packet from stream 0: error -541478725 "End of file". zm_ffmpeg_camera.cpp

2016-07-07 17:12:12.962923 zmc_m1 29642 INF Cameraname: 10000 - Capturing at inf fps zm_monitor.cpp

2016-07-07 17:12:29.269306 zmc_m1 29642 WAR Buffer overrun at index 19, image 39219, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp

at this time i reconnected the camera via the source save button:

2016-07-07 17:12:32.732086 zma_m1 29646 INF Cameraname: 4000 - Analysing at 12.99 fps zm_monitor.cpp 1287
2016-07-07 17:12:29.544318 zma_m1 29646 INF Cameraname: 3962 - Gone into prealarm state zm_monitor.cpp 1680
2016-07-07 17:12:29.541157 zma_m1 29646 WAR Signal: Reacquired zm_monitor.cpp 1420
2016-07-07 17:12:29.273876 zmc_m1 29642 INF Successfully reopened stream. zm_ffmpeg_camera.cpp 134
My Personal Blog: https://mattionline.de
Zmjm15
Posts: 90
Joined: Fri Jul 31, 2015 7:56 pm

Re: Camera gets blue every few days

Post by Zmjm15 »

I've only ever had the blue screen when there's a problem with the camera itself. Check it's connected properly. We do nwe'd something to stop the fps and cpu usage shooting up when it happens though
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Camera gets blue every few days

Post by bbunge »

Check your tmpfs memory (/dev/shm). Lower the resolution and frame rate.
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Re: Camera gets blue every few days

Post by mattionline »

Today my camera went blue again.

After a source -> save it worked again.

I figured out that i have used /tmp/zm as the path. I have changed it to /dev/shm
The frame rate is currently set in the ip camera settings, so no limitation in zm. It's currently at 8 FPS

Thanks for you help. I'll watch if the shm setting solved the problem and if not i do further investigations and lower the resolution.
My Personal Blog: https://mattionline.de
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Re: Camera gets blue every few days

Post by mattionline »

Now the camera picture is blue again.
then i checked if shm is currently used (i get a lot of images, so its used)

-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00990.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00991.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00992.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00993.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00994.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00995.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00996.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00997.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00998.jpg
-rw-r--r-- 1 www-data www-data 20972 Jul 8 11:10 zmswap-i00999.jpg

my load (quadcore):
top - 11:11:14 up 16 days, 18:46, 4 users, load average: 2,18, 1,74, 1,25
Tasks: 224 gesamt, 4 laufend, 220 schlafend, 0 gestoppt, 0 Zombie
%CPU(s): 53,8 be, 1,3 sy, 0,0 ni, 43,6 un, 0,8 wa, 0,0 hi, 0,5 si, 0,0 st
KiB Spch : 16291312 gesamt, 99896 frei, 2760896 belegt, 13430520 Puff/Cache
KiB Swap: 8245244 gesamt, 6207436 frei, 2037808 belegt. 12632396 verfü Spch

root@blubb:~# ps aux | grep zm
www-data 1663 0.0 0.0 85524 6008 ? S Jun21 8:37 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data 1943 0.0 0.1 104168 23072 ? S Jun21 0:16 /usr/bin/perl -wT /usr/bin/zmfilter.pl
www-data 1948 0.0 0.0 89024 9752 ? S Jun21 0:45 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
www-data 1953 0.0 0.0 83932 11424 ? S Jun21 1:37 /usr/bin/perl -wT /usr/bin/zmwatch.pl
www-data 2176 4.7 1.6 1016884 275904 ? Sl Jul01 474:03 /usr/bin/zmc -m 3
www-data 2180 2.6 1.6 657264 276840 ? S Jul01 263:20 /usr/bin/zma -m 3
www-data 2225 1.5 0.4 451904 65960 ? S Jul01 160:02 /usr/bin/zmc -m 2
www-data 2229 0.8 0.4 453528 73192 ? S Jul01 80:42 /usr/bin/zma -m 2
www-data 5169 0.0 0.2 112744 34724 ? S Jul07 0:00 /usr/bin/perl -w /usr/bin/zmupdate.pl -c
www-data 19670 5.7 1.8 1015464 308044 ? Sl 11:13 0:25 /usr/bin/zmc -m 1
www-data 19674 1.9 1.6 645248 274980 ? S 11:13 0:08 /usr/bin/zma -m 1
root 19918 0.0 0.0 15800 924 pts/3 S+ 11:20 0:00 grep zm

zm log at the time of the camera disconnect:
2016-07-08 10:56:21.125490 zma_m1 16866 WAR Signal: Lost zm_monitor.cpp 1420
#then i got a few ones of those log entries
2016-07-08 10:57:03.153048 zma_m1 16866 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1315
2016-07-08 11:11:27.298224 zma_m1 16866 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1315

after the source->save the camera appears again:

2016-07-08 11:13:28.313758 web_php 16820 ERR socket_sendto( /var/run/zm/zms-046018s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2371
2016-07-08 11:13:28.008408 undef 19694 INF No Server ID or Name specified in config. Not using Multi-Server Mode. zm_config.cpp 139
2016-07-08 11:13:26.573421 zma_m1 19674 INF In mode 3/1, warming up zma.cpp 142
2016-07-08 11:13:26.073878 web_php 13584 ERR Timed out waiting for msg /var/run/zm/zms-153245s.sock /usr/share/zoneminder/www/includes/functions.php 2371
2016-07-08 11:13:25.561508 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:25.182724 zms 19686 ERR Terminating, last frame sent time 1467969204.682640 secs more than maximum of 10.000000 zm_monitor.cpp 4392
2016-07-08 11:13:24.669892 undef 19686 INF No Server ID or Name specified in config. Not using Multi-Server Mode. zm_config.cpp 139
2016-07-08 11:13:24.560592 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:23.556555 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:23.079914 zms 19685 ERR Terminating, last frame sent time 1467969202.579854 secs more than maximum of 10.000000 zm_monitor.cpp 4392
2016-07-08 11:13:22.730612 web_php 17060 ERR socket_sendto( /var/run/zm/zms-812567s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2371
2016-07-08 11:13:22.569422 undef 19685 INF No Server ID or Name specified in config. Not using Multi-Server Mode. zm_config.cpp 139
2016-07-08 11:13:22.554002 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:21.550213 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:20.633770 zms 19684 ERR Terminating, last frame sent time 1467969200.133672 secs more than maximum of 10.000000 zm_monitor.cpp 4392
2016-07-08 11:13:20.547354 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:20.123264 undef 19684 INF No Server ID or Name specified in config. Not using Multi-Server Mode. zm_config.cpp 139
2016-07-08 11:13:19.544147 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503
2016-07-08 11:13:18.543496 zma_m1 19674 WAR Waiting for capture daemon zm_monitor.cpp 503

now i changed my bitrate from 4M to 2M and my frame rate from 8 to 5.
I'll see if this helps
My Personal Blog: https://mattionline.de
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Re: Camera gets blue every few days

Post by mattionline »

I have a question about the camera reconnect.

After i have rebooted my camera the live view in zoneminder is blue.
Even after half an hour the picture is still blue. Is it possible to reconnect the camera automatically?

camera reboot:
2016-07-10 15:22:02.548436 zmc_m3 19058 WAR Buffer overrun at index 7, image 42907, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3100
2016-07-10 15:22:02.513196 zmc_m3 19058 WAR Buffer overrun at index 7, image 42857, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3100
2016-07-10 15:22:02.455677 zma_m3 19062 WAR Signal: Lost zm_monitor.cpp 1420
2016-07-10 15:22:02.452630 zmc_m3 20868 ERR Unable to open input rtsp://USER:PW@192.168.2.142:88/videoMain due to: Broken pipe zm_ffmpeg_camera.cpp 271
2016-07-10 15:22:02.446972 zmc_m3 19058 ERR Unable to read packet from stream 0: error -541478725 "End of file". zm_ffmpeg_camera.cpp 167

after a while the image is still blue:
2016-07-10 15:36:44.444895 zma_m3 19062 INF Autos: 87000 - Analysing at 52.63 fps zm_monitor.cpp 1287
2016-07-10 15:36:25.680540 zma_m3 19062 INF Autos: 86000 - Analysing at 55.56 fps zm_monitor.cpp 1287
2016-07-10 15:36:07.668184 zma_m3 19062 INF Autos: 85000 - Analysing at 55.56 fps zm_monitor.cpp 1287
2016-07-10 15:36:06.159840 zma_m3 19062 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1315
My Personal Blog: https://mattionline.de
Locked