Crazy intermittent streaking issue on SV3C cameras

Forum for questions and support relating to the 1.30.x releases only.
jkeith248
Posts: 3
Joined: Tue Jun 06, 2017 6:16 pm

Crazy intermittent streaking issue on SV3C cameras

Post by jkeith248 »

Hi all,

I am having an odd issue in Zoneminder with SV3C POE cameras. I have 5 of them. Every couple of days or so one of the cameras will show up with a wild streaking image

Image

I have the cameras set to monitor and record in ZM at 10fps and the cameras are also set to output at only 7 fps at a resolution of 1920x1080 I have tried multiple framerates on both the camera side and ZM side to mitigate this issue, but to no avail.

I am running ZM 1.30.4 on Ubuntu 16.04 installed using the shell script for connors ppa found at the bottom of this page https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

I am running this using a Sabertooth 990fx mobo, AMD FX 8350 and 16GB of RAM. Ubuntu is the main and only OS installed and all it does is host zoneminder. I have a Ubiquiti 24port POE switch with plenty of bandwidth to handle the network traffic. I pulled high quality shielded Cat5 with inline surge protectors all properly grounded to each camera.

The cameras look fan-freakin-tastic for the price and work really well for a couple days then with no rhyme or reason the streaking appears on a random camera. All of the cameras have shown it in ZM at one point or another. No errors show up in the ZM log but of course it records alarms because of all of the motion in the image.

The really odd factor: When I open up the camera stream using VLC, while it is showing streaks in Zoneminder, the camera appears crystal clear in VLC but maintains streaks in ZM. The only way to make the streaks go away is to reset the Zoneminder service. Once the Zoneminder service restarts all streaking goes away.

The cameras were discoverd and configured using ONVIF. Is there anything that I can do to help this streaking go away? Thank you all so much in advance for any help that you may offer!

Code: Select all

Name	
DECK
Server	None
Source Type	Ffmpeg
Function	  Modect
Enabled	Yes
Linked Monitors	PATIODRIVEWAYFRONT DOORPLAYSET
Analysis FPS	
7.00
Maximum FPS (?)	
10.00
Alarm Maximum FPS (?)	
10.00
Reference Image Blend %ge	1.5625%
Alarm Reference Image Blend %ge	3.125%
Triggers	None available

Code: Select all

Source Path	rtsp://192.168.1.163:554/11
Remote Method (?)	TCP
Options (?)	
Target colorspace	32bit color
Capture Width (pixels)	
1920
Capture Height (pixels)	
1080
Preserve Aspect Ratio	
Orientation	Normal
Deinterlacing	Disabled 
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Crazy intermittent streaking issue on SV3C cameras

Post by bbunge »

You have a common problem but it looks like you have good settings.

Except, blank out these as they are for local cameras:
Analysis FPS
7.00
Maximum FPS (?)
10.00
Alarm Maximum FPS (?)
10.00

Set the frame rate at the camera to 5 fps and lower the key frame interval (key frame sends a full image at the settings value otherwise only image changes are sent).
Check free space in /dev/shm If you are out of memory lower the camera resolution by half.

Make sure you do not have Linked Monitors cross linked which will put them into an endless loop.
jkeith248
Posts: 3
Joined: Tue Jun 06, 2017 6:16 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by jkeith248 »

Thank you very much! I have throttled the output from the cameras to 5 fps. When you say "lower" the iframe rate, you mean increase the value so it sends an iFrame less often? As an example, I have the iFrames set to 10 right now. Should I increase the value?

I have also deleted the values you mentions for analysis, maximum and alarm fps.

My dev/shm hovers right around 25% pretty consistently.

No monitors are linked with each other so I think we are good there.

I will let it run for a couple days and share my findings. Thanks!!!
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Crazy intermittent streaking issue on SV3C cameras

Post by bbunge »

Lower the iframe so it sends a full frame more often. The way you have it a full frame is sent every 2 seconds but play with it tillit works!
jkeith248
Posts: 3
Joined: Tue Jun 06, 2017 6:16 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by jkeith248 »

So I have the refresh at 5fps and iFrame at 5. I am still getting the streaking issue every couple of days on at least one camera. Is there anything else I can try?
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: Crazy intermittent streaking issue on SV3C cameras

Post by Baylink »

> The really odd factor: When I open up the camera stream using VLC, while it is showing streaks in Zoneminder, the camera appears crystal clear in VLC but maintains streaks in ZM. The only way to make the streaks go away is to reset the Zoneminder service. Once the Zoneminder service restarts all streaking goes away.

To me, that suggests that the problem isn't in the camera, it's in the ZMC daemon attached to it -- unless VLC is looking at one of a camera's two encoders, and ZM the other one; you're using exactly the same connect URL in VLC as in ZM?
delancj
Posts: 5
Joined: Fri Aug 25, 2017 5:03 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by delancj »

I have the same issue.

Cameras : SV3C
Distro : Ubuntu 16.04
ZM version : v1.30.4
Arch : x64 (AMD) details below
RAM : 16 Gb

Installed from Ubuntu repo.

It seems that there is something going on with ffmpeg, just taking a guess, because it is attached to the stream and recording the jpg files. VLC uses ffmpeg as well yet doesn't see the issue.

I also have an interesting log message (however I have set both chmod and chown liberally to try to stop the message):

2017-08-25 12:15:13.358345 web_php 1711 ERR Cannot write to content dirs('events','images'). Check that these exist and are owned by the web account user /usr/share/zoneminder/www/index.php 159



root@cam:/home/cam# cat /root/.bash_history | grep chown
chown -R www-data:www-data /var/cache/zoneminder

root@cam:/home/cam# ls -la /var/cache/zoneminder/
total 20
drwxr-xr-x 5 www-data www-data 4096 Jul 20 21:04 .
drwxr-xr-x 9 root root 4096 Aug 25 11:25 ..
drwxr-xr-x 6 www-data www-data 4096 Jul 27 19:05 events
drwxr-xr-x 2 www-data www-data 4096 May 9 12:54 images
drwxr-xr-x 2 root root 4096 May 9 12:54 temp
delancj
Posts: 5
Joined: Fri Aug 25, 2017 5:03 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by delancj »

- I'm using the same connect url in both.
- I am not sure if the write to content dirs error is related. @jkeith248, do you also see that error?
delancj
Posts: 5
Joined: Fri Aug 25, 2017 5:03 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by delancj »

Update
- The write to content dirs error had another root cause, which is solved.
- I still have streaking on this system.
- I have another ZoneMinder system running Debian and the same cameras at 720p, and it does not have streaking.
- Either a different version of ffmpeg, sysctl variables or resolution would remove the streaking.
delancj
Posts: 5
Joined: Fri Aug 25, 2017 5:03 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by delancj »

It seems like I've found a solution. Move the color from 24-bit to 32-bit in zoneminder. See if that works for you. Also, please write back if it does... seems like this thread has gone dead.
delancj
Posts: 5
Joined: Fri Aug 25, 2017 5:03 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by delancj »

So the color wasn't a perminante fix. The issue did happen again.

I moved to Debian9 (along with my other zoneminder machines) and the problem has been gone for 3 days.

There are different versions of ffmpeg on the two distros.

=======debian9 ffmpeg

root@zoneminder-deb8:~# ffmpeg
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516

=====ubuntu ffmpeg

root@zoneminder-ubu16_04:~$ ffmpeg
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
frink182
Posts: 1
Joined: Fri Sep 15, 2017 9:14 am

Re: Crazy intermittent streaking issue on SV3C cameras

Post by frink182 »

I have two SV3C cameras and I too have the same streaking problem. Glad I found this thread.
I'm using ZoneMinder 1.30.4 on Ubuntu 16.04. I tried changing the colour depth from 24 to 32-bit, this didn't fix the issue. I also upgraded ffmpeg to 3.3.4-1 but unfortunately this has not helped either.
I have noticed that restarting zoneminder fixes the issue, and the problem only seems to affect the highres stream (not the lowres sub stream).
fendo
Posts: 2
Joined: Thu Dec 14, 2017 1:20 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by fendo »

I have two SV3C cameras and I have the same problem.
$ ffmpeg
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
I hope ...
fendo
Posts: 2
Joined: Thu Dec 14, 2017 1:20 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by fendo »

Hi, I solved my problem.
Ubumtu server 16.04 LTS, Zoneminder 1.30.4
Zoneminder->option->image check OPT_FFMPEG , PATH_FFMPEG = /usr/bin/ffmpeg.
With sudo :
  • cd /usr/lib/cgi-bin
    rm nph-zms (if old release zm was installed )
    rm zms (if old release zm was installed )
    ln -s /usr/lib/zoneminder/cgi-bin/nph-zms nph-zms
    ln -s /usr/lib/zoneminder/cgi-bin/zms zms
    service zoneminder restart
(Follows https://github.com/ZoneMinder/ZoneMinder/issues/1879)

SV3C 960p
Source:
  • rtsp://username:password@ip_address:554/11 or 12
    TCP
    Color 32bit
General:
  • Mode ffmpeg
    Analysis fps 5
    Max fps 7
    Allarm fps 5
Bye
Ferdinando
btr2
Posts: 3
Joined: Fri Jan 12, 2018 12:41 pm

Re: Crazy intermittent streaking issue on SV3C cameras

Post by btr2 »

Same problem here - fendo, will try your bit, but would be good to narrow down further which of these adjustments actually solved the problem, as it won't be all of them.

Ben R
Locked