RTSP Problem

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

RTSP Problem

Post by jepide »

Hello !

I have ubuntu 18.04.4 with zoneminder v1.32.3 installed on a barebone Beebox (7.3 Gio memory, intel Celeron 1.6 GHz x 4).
There are 3 cameras: 2 Heden CAMHD023FX0, and a MCL camera IP-CAM628EW, all wired connected. Their characteristics are nearly the same, so are their settings too.
The two Heden cams use ffmpeg as 'Source type' TCP as 'method' in zoneminder and work very well without problems.
But the MCL cam have ceased to work with ffmpeg, I do not know why, so I have set the 'source type' to Libvlc. Then the corresponding monitor works very well for a moment (for example 8 hours), and then the monitor image freezes, except that the timestamp is currently updated. The 'Log' remains green. While the monitor image is frozen, I can see a very good image by viewing the cam directly in vlc or ffplay.
When I edit and just save the monitor, the stream is good again and the image nice, for an new moment.
I deleted and reinstalled the monitor for this cam, but no success.
log with ffmpeg:
2020-05-09 16:31:20 zma_m3 6617 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-05-09 16:31:20 zmdc 1296 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-05-09 16:31:19 zma_m3 6616 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-05-09 16:31:19 zmdc 1296 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-05-09 16:31:08 zmdc 1296 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-05-09 16:31:08 zma_m3 6607 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-05-09 16:30:52 zma_m3 6592 ERR Shared data not initialised by capture daemon for monitor Cam1

May somebody tell me why ffmpeg cannot connect, or where to look for ?
may somebody explain why libvlc stop working after a long time ?

Thank you
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: RTSP Problem

Post by burger »

Some cameras don't have good compatibility w/zm.

https://wiki.zoneminder.com/Finding_Camera_Stream_Paths
and
https://wiki.zoneminder.com/Hardware_Compatibility_List

If you want details, pick up some books on the RTSP protocol and dive in.

You can try lowering FPS/resolution. Changing feed type (both on camera).
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
terijordan
Posts: 1
Joined: Sat Jul 18, 2020 6:30 am

Re: RTSP Problem

Post by terijordan »

Thank you very much for the very detailed help!
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

Re: RTSP Problem

Post by jepide »

I’m still doing a reset (I edit and just save the monitor) at least two times a day.
May somebody tell me what saving the monitor do ?
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: RTSP Problem

Post by iconnor »

Saving the monitor causes the processes to be restarted (so they can pick up the new settings).

On a modern system like this the ffmpeg monitor type SHOULD work. The libvlc type is not optimal (vlc libs are not designed for our purposes).

I'd be more interested in seeing debug logs of ffmpeg connecting.
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

Re: RTSP Problem

Post by jepide »

Thank you iconnor for the interest you bring to this problem.

here are the logs of ffmpeg connecting:
2020-07-27 08:52:30 zma_m3 16243 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-07-27 08:52:30 zmdc 15701 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-07-27 08:52:28 zmdc 15701 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-07-27 08:52:28 zma_m3 16242 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-07-27 08:52:27 zma_m3 16233 WAR Impossible situation. No timestamp on captured image index was 0, image-buffer_count was (80) zm_monitor.cpp 839
2020-07-27 08:52:27 zma_m3 16233 WAR Impossible situation. No timestamp on captured image index was 0, image-buffer_count was (80) zm_monitor.cpp 839
2020-07-27 08:52:27 zmwatch 15825 ERR Memory map file '/dev/shm/zm.mmap.3' does not exist. zmc might not be running. zmwatch.pl
2020-07-27 08:52:17 zmc_m3 16225 ERR Failed to prime capture of initial monitor zmc.cpp 253
2020-07-27 08:52:17 zmc_m3 16225 ERR swscale does not support the codec format: zm_ffmpeg_camera.cpp 602
2020-07-27 08:51:57 zma_m3 16224 ERR Shared data not initialised by capture daemon for monitor Cam1 zm_monitor.cpp 477
2020-07-27 08:51:57 zmdc 15701 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-07-27 08:51:56 zmdc 15701 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-07-27 08:51:56 zma_m3 16223 ERR Shared data not initialised by capture daemon for monitor Cam1 zm_monitor.cpp 477
2020-07-27 08:51:55 zma_m3 16212 WAR Impossible situation. No timestamp on captured image index was 0, image-buffer_count was (80) zm_monitor.cpp 839
2020-07-27 08:51:55 zma_m3 16212 WAR Impossible situation. No timestamp on captured image index was 0, image-buffer_count was (80) zm_monitor.cpp 839
2020-07-27 08:51:55 zmwatch 15825 ERR Memory map file '/dev/shm/zm.mmap.3' does not exist. zmc might not be running. zmwatch.pl
2020-07-27 08:51:44 zmc_m3 16199 ERR swscale does not support the codec format: zm_ffmpeg_camera.cpp 602
2020-07-27 08:51:44 zmc_m3 16199 ERR Failed to prime capture of initial monitor zmc.cpp 253
2020-07-27 08:51:34 zmdc 15701 ERR 'zma -m 3' exited abnormally, exit status 255 zmdc.pl
2020-07-27 08:51:34 zma_m3 16204 ERR Shared data not initialised by capture daemon for monitor Cam1 zm_monitor.cpp 477

I see : 'swscale does not support the codec format' and also 'Impossible situation'.
But with Libvlc it works well even if that it is only for a few hours (this is another mystere)
As i can see the cam1 (m 3) with ffplay, I think it is also possible to see it in zoneminder, but i do not know how to do.

May you tell me something to try ?
Post Reply