Not able to view some events

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
liquidcool
Posts: 7
Joined: Sun Dec 16, 2018 12:33 am

Not able to view some events

Post by liquidcool » Tue Dec 18, 2018 6:51 pm

I am running v1.32.2 (rpm install on CentOS)

Some events I can view and others not. Very random.

When I look through the events and the duration time, I do notice that the ones that are failing have no duration at all ie: 00:00:00

This is quite frustrating.

It comes up with the error :
The video could not be loaded, either because the server or network failed or because the format is not supported.

Has anyone been able to resolve this ?

Pedulla
Posts: 133
Joined: Thu Nov 27, 2014 11:16 am
Location: Portland, Or

Re: Not able to view some events

Post by Pedulla » Tue Dec 18, 2018 7:20 pm

A few of questions:
What video write method are you configured for?
Are there event files in the given event directory?
Is it random across multiple zm monitors?
Are you able to successfully and consistently stream the monitors?
What is your /dev/shm utilization?
Is this a single server?

liquidcool
Posts: 7
Joined: Sun Dec 16, 2018 12:33 am

Re: Not able to view some events

Post by liquidcool » Tue Dec 18, 2018 7:54 pm

Hi,

Video writer is x264 Encoded
The event files are in the folders for the failing events - though the file sizes are all the same at 602 bytes
it is random across all 3 of my monitors
I can stream each camera without any issues
/dev/shm is at 8%
This is a single server

liquidcool
Posts: 7
Joined: Sun Dec 16, 2018 12:33 am

Re: Not able to view some events

Post by liquidcool » Tue Dec 18, 2018 8:05 pm

I think I am seeing a trend.

Anything that is alerting and has less than about 9/10 frames (which is not even a single second of footage as the camera is capturing at about 8-9fps), I cannot view the footage.

Majority of all the failing ones have only 6/7frames in them.

I am able to view the frame analysis for the alerting frame(s)

liquidcool
Posts: 7
Joined: Sun Dec 16, 2018 12:33 am

Re: Not able to view some events

Post by liquidcool » Tue Dec 18, 2018 9:36 pm

I think I fixed it.

I changed the buffers for the capture.

Set the Pre and Post event image count to 10. That seems to have created enough frames for a video to be created.

mikb
Posts: 401
Joined: Mon Mar 25, 2013 12:34 pm

Re: Not able to view some events

Post by mikb » Wed Dec 19, 2018 5:28 pm

To completely misquote Tony Hancock ... "Six frames? That's barely a GOP!"

I can well believe that some software may not cope well with such a trivial video snippet.

Of course, if that's the actual length of the event (e.g 2 FPS, 3 seconds long) then you probably expect it to work.

But formats like MP4 and MPEG work on groups of pictures (GOP) of a certain size (defineable). The codec may not have even got warmed up, before it runs out of data and has to close down again.

I've had problems before with missing a little bit at the start/end of videos -- not in ZoneMinder however -- and I think you've probably found a lower-size-limit on video length :(

Note: MJPEG (motion JPEG), individual JPEGs, and MPEGS/MP4s made of "all I Frames" (no intra-frame compression) don't usually suffer from this, but they chew up disk space faster.

liquidcool
Posts: 7
Joined: Sun Dec 16, 2018 12:33 am

Re: Not able to view some events

Post by liquidcool » Thu Dec 20, 2018 10:53 am

So I think I really have gotten to the bottom of this and hope this may help other people.

So besides changing the pre and post buffer (which I now changed to 15 frames) I did a little research into how video streams work. One of the things I came up with was the Key Frame. So for a video stream to work (a be able to view it) there has to be a key frame for the rest of the frames to work on. I had a look at my cameras and they all seemed way to high. Two of them were at 43 frames (which, when running at 8/9 fps at night was basically giving a key frame every 4/5 seconds). So I set these to be 12 Frames. this means that when there is an event, sometime during the buffer there was a key frame, and therefore creating the video file made it viewable.

Since then I have not had any issues with not being able to view events. I may increase the buffers higher as they give "context" to the event that is being triggered. It allows me to see a few seconds before and after the event was triggered.

On another note I found changing the capture to H264 passthrough has lowered my CPU load a little (and also switching off logging)

I hope this will help someone with the same issue I have had....

mikb
Posts: 401
Joined: Mon Mar 25, 2013 12:34 pm

Re: Not able to view some events

Post by mikb » Thu Dec 20, 2018 5:27 pm

I think you're right.

BTW "Key frame" is basically the same as "I" frame that I referred to (MPEG terminology).

This "long GOP" situation is very good for keeping bitrates down. But it is why some videos can take a couple of seconds to get back to normal after a bit of corrupt data, or are hard to seek to an exact location in -- some media players/hardware will only seek to a key frame, or can only pause at a key frame.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest