Can't use Substream and Main Stream in the same time, ffmpeg crush with signal 11

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Can't use Substream and Main Stream in the same time, ffmpeg crush with signal 11

Post by zmaximz »

Hello, I've testing in 1.36.33 and 1.37.40 motion analysis by sub stream but both my 1080p IPC hikvision and common chinese noname not working.
In both cases zmc crushing with signal 11, Is there a way to make it work? Like different versions of ffmpeg or ubuntu or some settings?
I'm playing around for third day and can't figure out what is wrong, can anyone help?
I've tried different settings with vbr cbr frame interval resolution and no luck.

ffmpeg 4.2.7-0ubuntu0.1
Ubuntu 20.04.6 LTS

debug log from error to error:
https://pastebin.com/5YeeW7S7

UPD: looks like error has been caused by disabled audio of main stream. No errors for now. But how can I be sure that analysis is really going by sub stream? CPU usage looks higher than my old settings - nodect record of main stream by triggering by modect substream analisis with decoding disabled for main stream, the only problem with this settings is frames database size up to 100gb and 100500 unnecessary sub stream monitors
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Re: Can't use Substream and Main Stream in the same time, ffmpeg crush with signal 11

Post by zmaximz »

Wrote script with node.js to grab messages from ipc, search for monitorid in zm database and to send trigger command, work nicely for now, but need code refactoring and testing with my poor skills. If anyone will be interested will share it later. As for now it receive alarm messages from xiongmai ipcs. Guess it can be updated with onviff also. I had no luck to figure out how to make onvif trigger to work in 1.37.
With decoding disabled, almost zero cpu usage.
Hope live view in 1.37 will be optimized somehow... I've tried 1.37 with docker but when I deleting monitors the zmc process of it is still running, so skipped 1.37 for now
dougmccrary
Posts: 1215
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Can't use Substream and Main Stream in the same time, ffmpeg crush with signal 11

Post by dougmccrary »

I've tried 1.37 with docker but when I deleting monitors the zmc process of it is still running, so skipped 1.37 for now
I believe that has been fixed in master. But all it takes to stop the orphan zmc is a restart.
zmaximz
Posts: 29
Joined: Mon Sep 03, 2018 12:27 pm

Re: Can't use Substream and Main Stream in the same time, ffmpeg crush with signal 11

Post by zmaximz »

Simple nodejs script for zoneminder with mariadb and Xiongmai ipc.
ipc has alarm server option turned on and send json message there when motion has been detected...
Nodejs listen for messages and checking monitor id in zoneminder database once it occurred...
Nodejs send telnet command to start/stop event...

I'm new in programming, but as for me it works fine for now, can be adapted to use in other configurations and ipc if they has any alarm server support
https://github.com/maxrudiy/nodezm
Post Reply