RTSP camera set up

Forum for questions and support relating to the 1.31.x releases only.
Locked
dinki
Posts: 8
Joined: Wed Sep 19, 2018 6:32 pm

RTSP camera set up

Post by dinki »

OS: Linux omv 4.17.0-0.bpo.3-amd64 #1 SMP Debian 4.17.17-1~bpo9+1 (2018-08-27) x86_64 GNU/Linux
ZM version: v1.31.47 running in Docker containter (
Log file: https://pastebin.com/kUHHDAF6
Camera1 (x3): ieGeek Wifi Wireless Security Camera Outdoor IP Camera (https://www.amazon.com/gp/product/B01JLZKSD8/)
Camera2 : NSC-DB1 Onvif Compatible Wifi Doorbell 1080P IP Camera (https://www.nellyssecurity.com/nsc-db1- ... amera.html)

Hey guys. I'm a ZM newbie but I've been running and have tried tons of other surveillance PVRs. I'm currently running Blue Iris. I'm trying to get off of Windows and move to Linux for my four cameras. I've got ZM running in a docker container using linuxserver/zoneminder.

I'm trying to connect to my three cameras which are Foscam FI86xx/98xx compatible and my doorbell camera which is a Hikvision camera. I can open the three cameras in VLC using a url like rtsp://admin:mypass@192.168.0.21:554/1 and I can connect to the doorbell camera with a url like rtsp://admin:mypass@192.168.0.22:554/h264/ch01/main/av_stream .

In ZM, I have General->Source Type-> Ffmpeg and Source->Source Path->URL from above Method->TCP and width and height set to the correct values.

All cameras show 'Not Running'. I am able to use curl from within the docker container and hit one of the camera's web page so I'm assuming that ZM can access my cameras by the IP address. I only tried the one camera but I assume the others are accessible as well.

Note that I have tried the Foscam specific settings from the wiki but was unable to get them to work.

Can someone tell me where I am going wrong? Is there an easy way to troubleshoot this? I clicked on the logs and I don't see anything regarding the cameras and connection issues. Admittedly I'm not exactly sure where to look.

Any help is greatly appreciated and thanks for your patience.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: RTSP camera set up

Post by knight-of-ni »

Sounds like you are doing it right. If you can see the stream from VLC using the RTSP url then that should work in ZoneMinder as well.

Disable all cameras but one. To do that, do both: set it's function to none and uncheck the enabled checkbox.

Leave one camera enabled and set its function to Monitor or Modect.
When you save a monitor, it can take ~30 seconds or so for ZoneMinder to negotiate the RTSP stream and display an image.

Ignore the "Not Running" status. What happens when you actually try to view the monitor?
Open the Log. It's right on the web console. If you don't get an image, then there are guaranteed to be errors in the log.

We need to see the contents of the log from the moment you start ZoneMinder up until just after errors appear.

Keep an eye on your ramdisk /dev/shm. It's displayed in the header of the web console, and it's size it particularly small by default when running in Docker.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
dinki
Posts: 8
Joined: Wed Sep 19, 2018 6:32 pm

Re: RTSP camera set up

Post by dinki »

Thanks for the tips. I've disabled all but one and set that one to Function->Monitor. I restarted the container. When I click on the monitor page I see a broken image symbol that keeps reloading. I've captured the logs here: https://pastebin.com/FAsnS9Tp .

/dev/shm is showing 100% .. I'm guessing that this is not good.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: RTSP camera set up

Post by knight-of-ni »

Yeah, that's the problem. You need to increase the size of /dev/shm, probably by a lot.

Here is how we set /dev/shm for our Dockerfiles:
https://github.com/ZoneMinder/zmdockerf ... erfile#L37
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
dinki
Posts: 8
Joined: Wed Sep 19, 2018 6:32 pm

Re: RTSP camera set up

Post by dinki »

That was it. I now see my camera in all of it's glory! Thanks for the quick service.
dinki
Posts: 8
Joined: Wed Sep 19, 2018 6:32 pm

Re: RTSP camera set up

Post by dinki »

I've got my cameras set up and working fine but I am unable to grab audio from my doorbell camera. I am able to hear audio from the same rtsp stream that I am using when playing the camera through VLC. I did set Storage ->'Whether to store the audio stream when saving an event.' to true. Is there something else I need to do to capture audio?
User avatar
iconnor
Posts: 2897
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: RTSP camera set up

Post by iconnor »

Please note that audio will only be available in the stored events, not live view.
chebo
Posts: 29
Joined: Wed Mar 16, 2016 4:38 am

Re: RTSP camera set up

Post by chebo »

I have a similar problem. The monitors №48,49,51 report 'Not Running' or 'Not Capturing'. This problem is only with 3 "Hiwatch ds-l103" cameras that work via the Internet. And it shows up only if you change the monitor type manually, after rebooting, the camera works normally for a while. There are no problems with other cameras via the Internet or with the same ones in the local network. I use v1.31.44, at 1.30 there was no such problem. Here are some errors from the log:

Code: Select all

	                                                ERR	'zma -m 51' exited abnormally, exit status 255	zmdc.pl	
2018-09-26 16:24:49.064399	zma_m51		6467	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	544
2018-09-26 16:24:47.974570	zmdc		8252	ERR	'zma -m 48' exited abnormally, exit status 255	zmdc.pl	
2018-09-26 16:24:47.927193	zma_m48		6464	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?
2018-09-27 15:59:41.259810	zmwatch		28358	ERR	Memory map file '/dev/shm/zm.mmap.49' does not exist. zmc might not be running.	zmwatch.pl
2018-09-27 16:04:35.448511	web_js		22118	ERR	getStreamCmdResponse stream error: Socket /var/run/zm/zms-455688s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()	?view=watch	
2018-09-27 16:04:35.397892	web_php		22306	ERR	Socket /var/run/zm/zms-455688s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.	/usr/share/zoneminder/www/includes/functions.php	2023
2018-09-27 16:04:35.384823	web_js		22118	ERR	getStreamCmdResponse stream error: No data to read from socket - checkStreamForErrors()
chebo
Posts: 29
Joined: Wed Mar 16, 2016 4:38 am

Re: RTSP camera set up

Post by chebo »

chebo wrote: Thu Sep 27, 2018 1:29 pm I have a similar problem. The monitors №48,49,51 report 'Not Running' or 'Not Capturing'. This problem is only with 3 "Hiwatch ds-l103" cameras that work via the Internet. And it shows up only if you change the monitor type manually, after rebooting, the camera works normally for a while. There are no problems with other cameras via the Internet or with the same ones in the local network. I use v1.31.44, at 1.30 there was no such problem. Here are some errors from the log:

Code: Select all

	                                                ERR	'zma -m 51' exited abnormally, exit status 255	zmdc.pl	
2018-09-26 16:24:49.064399	zma_m51		6467	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	544
2018-09-26 16:24:47.974570	zmdc		8252	ERR	'zma -m 48' exited abnormally, exit status 255	zmdc.pl	
2018-09-26 16:24:47.927193	zma_m48		6464	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?
2018-09-27 15:59:41.259810	zmwatch		28358	ERR	Memory map file '/dev/shm/zm.mmap.49' does not exist. zmc might not be running.	zmwatch.pl
2018-09-27 16:04:35.448511	web_js		22118	ERR	getStreamCmdResponse stream error: Socket /var/run/zm/zms-455688s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()	?view=watch	
2018-09-27 16:04:35.397892	web_php		22306	ERR	Socket /var/run/zm/zms-455688s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.	/usr/share/zoneminder/www/includes/functions.php	2023
2018-09-27 16:04:35.384823	web_js		22118	ERR	getStreamCmdResponse stream error: No data to read from socket - checkStreamForErrors()
The problem is still relevant!
Locked