Anyway - ever since I upgraded zoneminder, many of my cameras that are set to "Encode" don't actually record a working video. I first thought it was a problem with 1.37, but it occurs on 1.36.3 too.
The cameras on "Camera Passthrough" work fine. Changing the video writer of a camera that causes issues with "Encode" to "Camera Passthrough" allows it to work once more, so there's a workaround, I'm in no rush or pressure to have it fixed.
As for the "Encode" video writer - when it happens:
1. The mp4 created is unrealistically small:
Code: Select all
> /var/cache/zoneminder/events/6/2021-05-31/471044# ls -l
total 176
-rw-r--r-- 1 www-data www-data 28528 May 31 01:16 471044-video.mp4
-rw-r--r-- 1 www-data www-data 69769 May 31 01:15 alarm.jpg
-rw-r--r-- 1 www-data www-data 1310 May 31 12:44 snapshot-64x36.jpg
-rw-r--r-- 1 www-data www-data 69769 May 31 01:15 snapshot.jpg
Code: Select all
> /var/cache/zoneminder/events/6/2021-05-31/471044# ffprobe -i 471044-video.mp4
ffprobe version 2.8.17-0ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '471044-video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2iso6mp41
title : Zoneminder Security Recording
encoder : Lavf56.40.101
Duration: 00:00:25.00, start: 0.000000, bitrate: 9 kb/s
Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv), 1280x720, 6 kb/s, 2.04 fps, 2 tbr, 90k tbn, 1000k tbc (default)
Metadata:
handler_name : VideoHandler
Code: Select all
May 31 01:15:46 cctv zmc_m6[22469]: INF [zmc_m6] [Camera6: 2861 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:1 Cause:Motion Detail]
May 31 01:15:46 cctv zmc_m6[22469]: INF [zmc_m6] [Camera6: 2836 - Opening new event 471044, alarm start]
May 31 01:15:47 cctv zmc_m6[22469]: INF [zmc_m6] [Camera6: 2838 - Gone into alert state]
May 31 01:15:47 cctv zmc_m1[7556]: INF [zmc_m1] [Camera1: 5188000 - Capturing at 8.00 fps, capturing bandwidth 11755bytes/sec]
May 31 01:15:48 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 450 - Analysing at 2.66 fps from 449 - 439=10 / 1622416548.145325 - 1622416544.383980 = 3.761345]
May 31 01:15:49 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 490 - Capturing at 2.65 fps, capturing bandwidth 316029bytes/sec]
May 31 01:15:51 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 460 - Analysing at 2.67 fps from 459 - 449=10 / 1622416551.895749 - 1622416548.145325 = 3.750424]
May 31 01:15:53 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 500 - Capturing at 2.67 fps, capturing bandwidth 319427bytes/sec]
May 31 01:15:55 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 470 - Analysing at 2.71 fps from 469 - 459=10 / 1622416555.586692 - 1622416551.895749 = 3.690943]
May 31 01:15:56 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 510 - Capturing at 2.71 fps, capturing bandwidth 324496bytes/sec]
May 31 01:15:56 cctv zmc_m1[7556]: INF [zmc_m1] [Camera1: 5188000 - Analysing at 8.00 fps from 5187999 - 5186999=1000 / 1622416556.989125 - 1622416432.044394 = 124.944731]
May 31 01:15:59 cctv zmc_m4[22891]: INF [zmc_m4] [Camera4: 480 - Analysing at 2.65 fps from 479 - 469=10 / 1622416559.355822 - 1622416555.586692 = 3.769130]
May 31 01:15:59 cctv zmc_m6[22469]: INF [zmc_m6] [Camera6: 2863 - Left alarm state (471044) - 51(2) images]
May 31 01:15:59 cctv zmc_m6[22469]: INF [zmc_m6] [Camera6: 2863 - Closing event 471044, alarm end]
The alarm.jpg and snapshot*.jpg files are valid and show the correct picture with the alarm reason.
Any ideas about where things go wrong?