Monitors Not Loading Images?

Discussions related to the 1.36.x series of ZoneMinder
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Monitors Not Loading Images?

Post by aj3 »

Hello,
I installed a fresh physical server with: Debian10 and ZoneMinder 1.36.20.
Server has 10TB and 16GB of RAM.

The database, I copied over the db I had in the previous ZoneMinder 1.34 installation.
After I dumped all the data into mariadb, I then ran zmupdate.pl -f

After that, things started to move along.

My problem is that at the moment, I have haphazardly monitors connecting or not connecting.
I'm not trying to MoDec, I just want to Record (or "Monitor" at this point).

I'm a little bit at a loss as to what I can try over on my side.

Any advice on what I can check?
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

I'm pulling the cameras with this string in the source:
rtmp://10.0.30.253/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=123456

All the cameras were working properly and recording under ZoneMinder 1.34

I'm not sure what I messed up.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

I attach here the Log's first 500 lines.
Attachments
tableExport(1).csv
(52.89 KiB) Downloaded 215 times
dougmccrary
Posts: 1268
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Monitors Not Loading Images?

Post by dougmccrary »

Looks a lot like camera/network fails.
Was rtmp working for you before?
I’d try rtsp.
User avatar
iconnor
Posts: 2948
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Monitors Not Loading Images?

Post by iconnor »

Please read the release notes.

Most notably... it could be ram requirements. CHeck your ImageBuffers vs MaxImageBuffers. MaxImageBuffers is new.. and should probably be equal to your old ImageBuffers setting. ImageBuffers should be low... like 3 or 5 or something. Max should be keyframe interval * 2 +1 but can be higher as it is just an upper limit. The ImageBUffer setting is in /dev/shm and is ALWAYS allocated.

The rest ... we will need to see log files.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Thank you both!!
@DougMcCrary: I tried rtmp and it didn't work.
Maybe the camera doesn't support it?

Yet in the last server (3 days ago?), running ZoneMinder 1.34, all cameras worked.
I could see them all live, and they all recorded their five minute events (no moDec... just Record).
I don't say they worked "perfectly", because I never checked the logs.
Maybe something was blowing up in there and I was ignorant to the fact.


@iconnor,
I just read the release notes: https://github.com/ZoneMinder/ZoneMinder/releases.
I *think* I'm good on the changes. I did check them all, yet didn't see something I missed.
Yet... chances are I high I did miss something. I'll re-read them with a fresh mind mid-day today.

The RAM could be the issue.
Do you mean the total ram of the server? (16GB in this case)
Or the ram allocated to php (or something similar)?
I haven't touched php's configuration -- it was installed as-is, and remains as-is.

My ImageBuffer setting was at 3.
I set MaxImageBuffer to 10.
I saw your math for calculating the MaxImageBuffer: keyframe * 2 + 1
Yet I'm unsure where the keyframe comes from: does the camera send it? Or does zoneminder "insert" it every so often?

I have the cameras set at 2 fps.


I'm uploading the log file from five minutes ago.
Do these help?
Or you want log files from apache?

Sorry for my n00bness!! I'm trying to push everything on my side before consuming time from others.
BTW, thank you for all the contributions everyone does to the project!
I should contribute... I'm no php wizard, yet I do have knowledge in it. Maybe there's some low-hanging fruit I can take off the plate.
Attachments
tableExport(2).csv
(13.3 KiB) Downloaded 209 times
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Well I'm just at a loss.
I scratched the server.
Installed Debian10, mariadb, php7, and zoneminder.

This time around I did NOT restore the database.
Just a from-scratch install.

I'm getting basically the same errors in the log file.
I'm attaching the Zoneminder log file to this post.

I don't understand why it worked fine under 1.34 and with 1.36 ... it doesn't cooperate.

====
EDIT: These are the instructions / HowTo I'm following:
https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo
Attachments
tableExport.csv
(12.7 KiB) Downloaded 191 times
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

So, good progress!
I found this link: https://community.reolink.com/topic/111 ... k-camera/5

And from there, changed the cameras over to rtsp (instead of the previous rtmp).

The cameras now seem to be working... although the quality is... just... like simulating an old-style VHS cassette deck?

Yet I'm happy... progress.
For my Reolink cameras, this is the connection string:
rtsp://username:password@address/h264Preview_01_main
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Wow so... I'm quite happy the cameras are working... yet...
The quality is just unacceptable.
What the heck happened?

I mean really... these monitors look like if they were connected via old-coaxial bnc cables with 13 patches and two water drips in the middle.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Hello,
I wanted to post again:
I still have not resolved the issue, yet if I can help in any way the developers, please do let me know.

I can run parallel tests if needed... or gather more information if needed.

Basically: sorry for my less than stellar attitude two days ago... yet I want to help the ZoneMinder project and the people behind it any way I can.

Anything I can do, please do let me know.

Thank you for the time and work you put into it.
I, and thousands of others appreciate it (even if we show it negatively most of the time!!)

Thanks
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: Monitors Not Loading Images?

Post by Ralphred »

aj3 wrote: Fri Jul 15, 2022 10:50 amYet I'm unsure where the keyframe comes from: does the camera send it? Or does zoneminder "insert" it every so often?
In this case we mean the cameras "keyframe interval", but Reolink doesn't give you this level of control over their encoder, so you are going to have to ask them, poke around inside the stream, or guess (I'd slap it at 121 and drop it until it breaks, or just eat the memory cost).
More importantly there is a lot of chatter about the reolink rtmp streams "looking better" than the rtsp ones. Try all your possible urls in ffplay before picking one for zoneminder

Code: Select all

ffplay rtsp://[some stuff]
ffplay rtmp://[some different stuff]
Their encoders are under-powered too, so make sure the sub stream is making the smallest dent possible in the encoder.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Thank you Ralph!

I'll give mutliple tries a go with ffplay.

I'll also change settings on the camera itself to see if it improves.

Question: would there be any insight in the ZoneMinder 1.34 code as to why it worked well?

One week ago with 1.34.?? everything looked spectacular.
Yet with 1.36.20 something happened.

Would there be something in the way ffmpeg was called in 1.34 vs 1.36?

Thank you!!
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: Monitors Not Loading Images?

Post by Ralphred »

aj3 wrote: Mon Jul 18, 2022 1:45 pmOne week ago with 1.34.?? everything looked spectacular.
Yet with 1.36.20 something happened.
There was something added to support newer versions of PHP, but there was a regression on older versions, and that got fixed, then the addition of the MaxImageBuffers. I think some of it was previous behaviours masking "bad things" in the background, and the changes just removed the mask, so you've got a legacy issue to deal with, but it looks new.
Would there be something in the way ffmpeg was called in 1.34 vs 1.36?
Without checking the git commits, no way to know, but I doubt anything groundbreaking; ffmpeg is a mature piece of software/API, and wrinkles in that code would have been ironed out generations ago, but an erroneous or ignored new setting in the config UI could be altering the way it's called between versions. This is why I like ffplay so much, it's so small and simple, any setting that could be wrong is in the camera or url, it totally cuts down on your "diagnosis surface" with such little effort.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Ralphred wrote: Mon Jul 18, 2022 4:16 pm I think some of it was previous behaviours masking "bad things" in the background, and the changes just removed the mask, so you've got a legacy issue to deal with, but it looks new.
This makes perfect sense.
I know it's a "maybe"... yet makes perfect sense.

I'll troubleshoot on my side, and update this thread for future Reolink owners.

Thank you!
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: Monitors Not Loading Images?

Post by aj3 »

Ok this ffplay is AWESOME.

Loving it.
I performed a test with rtmp and the stream looked as always: crystal clear.
Then did a test with rtsp and it was really bad connection, and got some quite good text back from ffplay (via command line).

I'm pasting that below.
For reference, using Windows PowerShell, here are the commands I ran:

Code: Select all

.\ffplay rtsp://admin:PASSWORD@10.0.30.251/h264Preview_01_main

.\ffplay rtmp://10.0.30.251/bcs/channel0_main.bcs?channel=0"&"stream=0"&"user=admin"&"password=PASSWORD
First the text that came back in PowerShell when I ran rtmp (with a REALLY good image).

Code: Select all

PS C:\Users\ampol\Downloads\ffmpeg-master-latest-win64-gpl\ffmpeg-master-latest-win64-gpl\bin> .\ffplay rtmp://10.0.30.251/bcs/channel0_main.bcs?channel=0"&"stream=0"&"user=admin"&"password=PASSWORD
ffplay version N-107429-g90810bb37c-20220718 Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220718
  libavutil      57. 29.100 / 57. 29.100
  libavcodec     59. 39.100 / 59. 39.100
  libavformat    59. 29.100 / 59. 29.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.100 /  8. 46.100
  libswscale      6.  8.100 /  6.  8.100
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
Input #0, flv, from 'rtmp://10.0.30.251/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=PASSWORD':
  Metadata:
    |RtmpSampleAccess: true
    displayWidth    : 2048
    displayHeight   : 1536
  Duration: 00:00:00.00, start: 135303.736000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 2048x1536, 2 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
135322.42 A-V:  0.000 fd=   0 aq=  102KB vq= 2838KB sq=    0B f=0/0
PS C:\Users\ampol\Downloads\ffmpeg-master-latest-win64-gpl\ffmpeg-master-latest-win64-gpl\bin>
And below, the text I got back when I ran the rtsp stream. I did get an image, yet REALLY bad.
I'm going to study this text to see what's going on:

Code: Select all

PS C:\Users\ampol\Downloads\ffmpeg-master-latest-win64-gpl\ffmpeg-master-latest-win64-gpl\bin> .\ffplay rtsp://admin:PASSWORD@10.0.30.251/h264Preview_01_main
ffplay version N-107429-g90810bb37c-20220718 Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220718
  libavutil      57. 29.100 / 57. 29.100
  libavcodec     59. 39.100 / 59. 39.100
  libavformat    59. 29.100 / 59. 29.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.100 /  8. 46.100
  libswscale      6.  8.100 /  6.  8.100
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 4 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[h264 @ 000001f137f4f1c0] concealing 8927 DC, 8927 AC, 8927 MV errors in I frame
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 6 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 7 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 10 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[h264 @ 000001f137f4f1c0] concealing 10251 DC, 10251 AC, 10251 MV errors in I frame
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 20 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 4 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
Input #0, rtsp, from 'rtsp://admin:PASSWORD@10.0.30.251/h264Preview_01_main':
  Metadata:
    title           : Session streamed by "preview"
    comment         : h264Preview_01_main
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 2048x1536, 90k tbr, 90k tbn
  Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
[h264 @ 000001f13d4e27c0] concealing 8927 DC, 8927 AC, 8927 MV errors in I frame
[h264 @ 000001f13d8fe7c0] concealing 10251 DC, 10251 AC, 10251 MV errors in I frame
[h264 @ 000001f13d4e8400] cabac decode of qscale diff failed at 40 14
[h264 @ 000001f13d4e8400] error while decoding MB 40 14, bytestream 152112
[h264 @ 000001f13d4e8400] concealing 10505 DC, 10505 AC, 10505 MV errors in I frame
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 7 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 3 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 3 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 2 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 4 packets
[h264 @ 000001f13d8fe3c0] concealing 10187 DC, 10187 AC, 10187 MV errors in I frame
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 1 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 9 packets
[rtsp @ 000001f137f4a500] max delay reached. need to consume packet
[rtsp @ 000001f137f4a500] RTP: missed 5 packets
Switch subtitle stream from #-1 to #-1 vq=    0KB sq=    0B f=0/0
[h264 @ 000001f13d4e8000] left block unavailable for requested intra4x4 mode -1
[h264 @ 000001f13d4e8000] error while decoding MB 0 16, bytestream 278794
[h264 @ 000001f13d4e8000] concealing 10289 DC, 10289 AC, 10289 MV errors in I frame
   3.74 A-V:  0.004 fd=   0 aq=   41KB vq=    0KB sq=    0B f=0/0
PS C:\Users\ampol\Downloads\ffmpeg-master-latest-win64-gpl\ffmpeg-master-latest-win64-gpl\bin>
Post Reply