Event won't play all frames

Support and queries relating to all previous versions of ZoneMinder
Locked
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Event won't play all frames

Post by tommy »

I'm running ZM 1.19.2 on a Debian installation, using Mozilla. I've been experimenting with the record and mocord modes but have hit a snag.
I have 2 cameras on a 4 input card sharing one BT848 chip.
I have set the cameras to record at a maximum rate of 5fps with a 5 frame post event buffer. There is no maximum when motion is detected.
In the monitor tab for the cameras, I specify Section Length = 7200 seconds or 2 hours.
One minute of video at 5fps = 300 frames. By specifying Frame Skip = 299, I get one frame every minute, more if there's motion. It works great. Any event over 125 frames( 1 picture/minute + 5 frame buffer) means there was at least one instance of motion during that 2 hour period. I just play that one 2 hour event at 100x or 50x. It saves playing several smaller events and I don't waste any time calling up false alarms. They just quickly roll by. Also, it's just plain fun. But of course there's a snag.
When I call up the event from the events window, it automatically begins to play using Cambozola v0.22. I change, the rate to 100x and things start to fly by. The problem is that it invariably stops as soon as there are less than 100 frames to play. If my 2 hour event, with motion detected is 325 frames long, the last frame played will be frame 300. If it's 640 frames, the last frame played will be 600. If I shorten the Section Length or increase the Frame Skip so that there are less than 100 frames, it won't play at all.
There doesn't seem to be a problem with the jpegs themselves. If I select the Video option when the event is displayed, it makes a perfect video using ffmpeg. I also choose 100x or 50x when making the video. All the frames are used by ffmpeg.
Any ideas how to get those last few frames to play in the event window?

Thanks
Tommy
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Post by tommy »

Phil:
It seems that those last missing frames appear in the event directory but don't have an entry in the Frames table. That's why my offline generated mpeg is complete but the playback in the event window is not. The playback window pulls frames according to what's in the database. My offline ffmpeg takes whatever is in the directory. Is it possible that the last 'n' Bulk frames are not getting recorded in the Frames table?
My ZM_BULK_FRAME_INTERVAL was set at the default 100. Perhaps that's why I couldn't playback less than 100 frames. I have since reduced my ZM_BULK_FRAME_INTERVAL to 5. With my previously mentioned setup this means bulk frames will be entered in to the database every 5 minutes. I'll try this for a while.
In any case, shouldn't any remaining bulk frames be entered into the database when my Section Length expires?

thanks
tommy
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Hi Tommy,

I'll take a look at this today and get back to you.

Phil,
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Hi Tommy,

Looking at my system here I can see that the last bulk frame of an event lies on a 100 boundary, so it may be 8100, whereas the last frame image might be 8137. In this case it looks like the streams will probably stop at 8100 instead of at the last frame. However I don't see any sign of any other frame records missing except for possibly one 'final' frame record to wrap up the event. Have you definitely seen several missing bulk frame records?

I think that I need to change it such that the streaming either works out where the last frame should be from the event length or that a terminal frame should always be written at the conclusion of an event. Video generation is is done in a slightly more basic way with all the frames totalled up and then an average frame rate calculated, all the images are then passed to the video generation program and the DB is largely ignored. Streaming tries to be a bit more intelligent about frame timings on the whole.

Phil,
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Post by tommy »

No Phil, it's just as you described. The last frame played would be 8100. I'm referring perhaps incorrectly, to those missing 37 frames as bulk frames. Now that I've changed my ZM_BULK_FRAME_INTERVAL to 5, I only miss at most 5 frames.

Thanks
Tommy
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Hi Tommy,

I've fixed this problem now and the fix will be in the forthcoming 1.19.3 release. It's quite a simple fix so I can put a patch up if you want it before then.

Phil,
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Post by tommy »

Are you quick or what! I would love a patch whenever you have time.
Thanks tons
Tommy
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Try this. This patch also includes earlier requested tweaks to the way mime-types are output from the streams but unless you are experimenting with different video formats it shouldn't make any difference.

Phil,
Locked