No video display - AVTECH DGM-5406P - VLC works

Forum for questions and support relating to the 1.30.x releases only.
Locked
mszil
Posts: 5
Joined: Tue Dec 26, 2017 12:19 pm

No video display - AVTECH DGM-5406P - VLC works

Post by mszil »

Hi all,

First time using ZoneMinder and have been struggling for quite a few hours to get any kind of display.

My system Basics:
ZM: 1.30.4
OS: Ubuntu 16.04 server (LAMP w/desktop)
Camera: AVTECH DGM-5406P
Firefox: 57.0.1


Followed the basic installation instructions - using MySql and can query the logs, etc.

At this point, I'm not even sure what all I've tried - I just keep playing with settings of the camera and ZM. VLC and FFPLAY just work but I can't get anything to display in ZM.

Here are 3 of the connecting strings that work in VLC / FFPLAY:

1. http://USER:PASSWORD@192.168.1.20:88/cg ... &channel=1 (=320x256 or 320x240 - resolution vs display resolution)

2. rtsp://USER:PASSWORD@192.168.1.20:88/live/video/profile2
(4 different profiles available, can't get any working. For profile 2 the full codec description in VLC is:
Stream 0
Type: Video
Codec: MPEG-H Part2/HEVC (H.265) (hevc)
Resolution: 640x480
Display resolution: 640x480
Decoded format: Planar 4:2:0 YUV full scale
)

3. rtsp://USER:PASSWORD@192.168.1.20:88/live/h264
(Full description in VLC is:
Stream 0
Type: Video
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Stream 1
Codec: MPEG-H Part2/HEVC (H.265) (hevc)
Resolution: 2592x1952
Display resolution: 2592x1944
Decoded format: Planar 4:2:0 YUV full scale
)

At various times I get a red source or a green source, but never a display. I've played with Source type, function, source path, remote method, target colorspace, capture width/height.

I'm currently using the 2nd connection string (profile2) - and the following monitor settings:

Image
Image

And I'm getting errors along the lines of:
2017-12-27 15:33:00.619738 web_php 5240 ERR Socket /var/run/zm/zms-320113s.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/lat ... window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 2033
2017-12-27 15:32:48.984044 zmc_m1 6862 INF FrontDoor: 6000 - Capturing at 10.00 fps zm_monitor.cpp 3125
2017-12-27 15:31:08.964242 zmc_m1 6862 INF FrontDoor: 5000 - Capturing at 10.00 fps zm_monitor.cpp 3125
2017-12-27 15:29:28.943937 zmc_m1 6862 INF FrontDoor: 4000 - Capturing at 10.00 fps zm_monitor.cpp 3125
2017-12-27 15:27:48.923316 zmc_m1 6862 INF FrontDoor: 3000 - Capturing at 10.00 fps zm_monitor.cpp 3125
2017-12-27 15:26:08.912632 zmc_m1 6862 INF FrontDoor: 2000 - Capturing at 10.00 fps zm_monitor.cpp 3125
2017-12-27 15:24:28.893672 zmc_m1 6862 INF FrontDoor: 1000 - Capturing at 9.90 fps zm_monitor.cpp 3125
2017-12-27 15:22:47.610320 zmdc 1396 WAR Can't find process with command of 'zma -m 1' zmdc.pl
2017-12-27 15:22:47.598082 zmc_m1 6862 INF Priming capture from rtsp://USER:PASSWORD@192.168.1.20:88/live/video/profile2 zm_ffmpeg_camera.cpp 104
2017-12-27 15:22:47.593482 zmc_m1 6862 INF Starting Capture version 1.30.4 zmc.cpp 247
2017-12-27 15:22:47.557380 zmdc 6862 INF 'zmc -m 1' started at 17/12/27 15:22:47 zmdc.pl
2017-12-27 15:22:47.557380 zmdc 1396 INF 'zmc -m 1' starting at 17/12/27 15:22:47, pid = 6862 zmdc.pl
2017-12-27 15:22:47.550570 zmdc 1396 INF Starting pending process, zmc -m 1 zmdc.pl
2017-12-27 15:22:47.546030 zmdc 1396 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl

At various times I've had capture rates between 10fps and 1000fps, but with the stream above I seem to get a believable & reliable 10fps.

I increased the log verbosity and looking at some of the logs in /var/log/zm - they seem to have a lot of entries with cookies (?). But one has entries like:
12/27/17 16:15:00.854556 zmc_m1[8033].DB3-zm_ffmpeg_camera.cpp/184 [Got frame 12]
12/27/17 16:15:00.855086 zmc_m1[8033].DB5-zm_ffmpeg_camera.cpp/170 [Got packet from stream 0]
12/27/17 16:15:00.855098 zmc_m1[8033].DB4-zm_ffmpeg_camera.cpp/180 [Decoded video packet at frame 13]
12/27/17 16:15:00.855101 zmc_m1[8033].DB3-zm_ffmpeg_camera.cpp/184 [Got frame 13]
12/27/17 16:15:00.928419 zmc_m1[8033].DB5-zm_ffmpeg_camera.cpp/170 [Got packet from stream 0]
12/27/17 16:15:00.928526 zmc_m1[8033].DB4-zm_ffmpeg_camera.cpp/180 [Decoded video packet at frame 14]

So it seems to be doing something, but I just can't get anything to display in the Firefox window that opens when clicking on the monitor name:
Image

I took a look at http://zoneminder.readthedocs.io/en/latest/faq.html and adjusted PATH_ZMS from /cgi-bin/nph-zms to /cgi-bin/zms. That's the last thing I've tried now and still no success. I'm just frustrated that so far the only feedback I see in the web interface is that sometimes the color of the monitor's source column is red and sometimes it's green.

Would greatly appreciate any advice. Thanks in advance.
Markus
Last edited by mszil on Sun Dec 31, 2017 4:49 am, edited 1 time in total.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: No video display - AVTECH DGM-5406P - VLC works

Post by bbunge »

Here is a link to some good install instructions:
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

But I feel your problem is the resolution. I usually cite the following:
Two common errors:
PATH_ZMS is not set to /zm/cgi-bin/nph-zms
Camera resolution in Zoneminder does not match camera output. Use VLC (Tools, Media Information, Codec) to check camera Display Resolution.

Your Display resolution: 2592x1944 is what you should use. Or divide that by two: 1296x972 or 648x486. Your camera may also be able to use other display resolutions but may use a different Source Path. Ffmpeg is your best bet for this camera but Remote may also work. Also use 32 bit colour.

In your camera set the frame rate down to 10 or lower. You should also have a setting for Key Frame Interval or something like that. It is the setting that tells the camera how often to send a full image. Set it to a low value to get the stream working then adjust it up to save bandwidth.

If you decide to use high resolution keep an eye on the space used in /dev/shm. Also make sure you have enough resources for MySQL to run.
mszil
Posts: 5
Joined: Tue Dec 26, 2017 12:19 pm

Re: No video display - AVTECH DGM-5406P - VLC works

Post by mszil »

Thanks for the response. I was hoping to do capture at 5MP - possibly at low frame-rates, just in case I need to pick up details like license plates. But at this point I don't think it's a resolution problem - I've tried many combinations of camera resolution, display resolution, without luck so far. My server is fairly new and has 32GB of RAM so I'm thinking that's plenty although I'm not sure if there are settings I should be adjusting to deal with larger images - I'll work on that after I get basic video working. The most recent stream I was using was just VGA - so resolution was set to 640x480 but no luck. I'm thinking it must be related to how the video stream is being served since the log files seem to indicate that the frames are being received and processed.

The next time I booted the server I got a system-problem notification which I opened and it was part of zoneminder. Googling a portion of the stack trace led me to:
https://github.com/ZoneMinder/ZoneMinder/issues/1879

which seems to describe similar symptoms, but I hadn't upgraded zoneminder, don't have the problem of multiple cgi-bin zms configuration folders and rerunning the installation scripts ("a2enmod cgi" and "a2enconf zoneminder") indicates they are already installed. I'll try to update everything again and redo it from the top - maybe I missed a step somewhere.

Thanks again.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: No video display - AVTECH DGM-5406P - VLC works

Post by bbunge »

Trust me. Your issue is resolution. The errors you report are consistent with wrong resolution. Your RAM is more than enough. Trust the settings that work with VLC and read my prior comments again!
mszil
Posts: 5
Joined: Tue Dec 26, 2017 12:19 pm

Re: No video display - AVTECH DGM-5406P - VLC works

Post by mszil »

After a long hiatus, I finally upgraded my server to 18.04 and returned to zm and the solution hit me - somehow while browsing the live camera in VLC and looking at the codec information I noticed it was v.265 and not v.264 - I hadn't noticed this before. Down a few levels in the camera configuration menus there was an option to select the codec for a particular stream. I set that to v.264 zm started working (I didn't actually try it again with v.265 - perhaps there is now support?). Just one more thing to check. Overall I'm fairly impressed.
Locked