How to set recording framerate

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
DavidFG
Posts: 3
Joined: Fri Sep 10, 2021 2:02 pm

How to set recording framerate

Post by DavidFG »

This should be a fairly easy setting to find, but so far I have not had any luck finding the right setting. Currently, "FFMPEG_OUTPUT_OPTIONS" is set to "-r 1" and "Frame Skip"/"Motion Frame Skip" are set to 99, but the recordings are still identical to the live feed directly from the camera.

Can someone help me out and point me to the correct setting that I have overlooked several times over?

Thank you for your help.

David
parky
Posts: 45
Joined: Sun Aug 28, 2011 8:41 am

Re: How to set recording framerate

Post by parky »

I thought you had to set the framerate at the camera along with it's key frame interval
DavidFG
Posts: 3
Joined: Fri Sep 10, 2021 2:02 pm

Re: How to set recording framerate

Post by DavidFG »

Maybe I am just hopeful, but I thought you could record at a lower framerate than the camera is outputting. The stream is already being re-encoded, so adding the option to reduce the framerate shouldn't be much of a hassle.
User avatar
Andyrh
Posts: 243
Joined: Sat Oct 28, 2017 3:55 am

Re: How to set recording framerate

Post by Andyrh »

I think it is harder than you think. Dropping frames is easy when you record at half the rate, but when you do not reduce by a number that is evenly divisible you would not longer drop frames evenly resulting in frames that are not evenly spaced in time.
Kind of like this for 10 FPS to 8 FPS:
Frames: a b c d e d g f h i
Keepers:1 2 4 5 6 8 9 10

Play back would be strange looking and maybe creepie because they do this kind of thing in scary movies.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: How to set recording framerate

Post by iconnor »

Wouldn't work on h265, as frames depend on both future and past frames.

You re-encode to a lower frame rate.

We COULD just not record frames, but as discussed, the result might not be pleasant. Might be interesting to try though. I would think we would want to keep all keyframes though.
DavidFG
Posts: 3
Joined: Fri Sep 10, 2021 2:02 pm

Re: How to set recording framerate

Post by DavidFG »

For reference, the camera is outputting at 25fps, we want to be able to watch it live at 25fps but only want to record at 1fps. If this cannot be done with the source set at 25fps then we might have to add the camera's sub stream as a separate device for recording and keep the main stream just for live viewing.

Thank you all for your help.
Post Reply