Hi - I have been using Zoneminder in JPEG only mode for a long time. I liked that mode but the storage and CPU usage just became untenable. I am now using video passthrough with Zoneminder 1.36.44.
My issue is cameras seem to generate recordings which are small numbers of frames but on playback show a total duration which is very high (over an hour). This is not every recording just some of them. Cameras are all h.264. I have tried to search the forums for this sort of issue... I have tried a few things like the movfaststart flag, different codecs from the cameras etc. This issue is also causing all sorts of problems with montage review and playback. The downloaded video files have the same issue in VLC. Here is an example file:
https://drive.google.com/file/d/1I7xi2- ... sp=sharing
This particular camera is an ffmpeg source, analysis enabled, decoding enabled in record mode.
My max buffer size is 20 frames which happens to be the number of frames these broken videos say they are. I don't see any errors in the log.
I am not sure what to try in terms of FFMPEG flags. Maybe somebody has a suggestion here?
Video Passthrough sometimes creates very long single frame recordings
Re: Video Passthrough sometimes creates very long single frame recordings
I had an issue on 1.36.33 where I was getting broken events where every once in a while, there would be dozens of low frame events, and the time would desync. I set the max image buffer size to 0 (unlimited) and the errors went away.
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
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
Re: Video Passthrough sometimes creates very long single frame recordings
Thanks, increasing the buffer seems to help. I guess this is happening when there is a network issues and ffmpeg is waiting on frames. I had some issues with unlimited, occasionally the camera would consume all the system memory. Trying to understand if there is a parameter which can be passed to ffmpeg so it doesn't use up all my memory waiting on a stream. I have some cameras offsite on long (> 1 mile) wifi links. Steam can sometimes drop for a second.
Re: Video Passthrough sometimes creates very long single frame recordings
If you were to look in your logs you would likely see billions of warnings about the queue being full and something not keeping up.
In 1.37 just like last week, I altered the algorithm for when everything is falling apart to not create these long empty events. It might make it into 1.36.36.
The issue is, we always have to start with a keyframe when recording, so we keep a keyframe at the beginning of the queue. If the queue is full, we delete packets AFTER the keyframe. So when we start a recording, we search back to the first keyframe and find... one from... forever ago.
So yeah a larger buffer will help.
In 1.37 just like last week, I altered the algorithm for when everything is falling apart to not create these long empty events. It might make it into 1.36.36.
The issue is, we always have to start with a keyframe when recording, so we keep a keyframe at the beginning of the queue. If the queue is full, we delete packets AFTER the keyframe. So when we start a recording, we search back to the first keyframe and find... one from... forever ago.
So yeah a larger buffer will help.
Re: Video Passthrough sometimes creates very long single frame recordings
That is great to know. Thinks are working quite a bit better now. Just put in my donation
Thanks for your help and long term commitment to Zoneminder!
Thanks for your help and long term commitment to Zoneminder!