VideoRecorderAppState framerate

Hello,



Is there a good reason why the framerate is hard coded? Could this behaviour be changed, so we could set the FPS at least before we initialize the state? I want to show some videos at 60 fps. I could also extend, re-implement the initialize to change that, but as said, is there a good reason for that implementation?



Thank you.

the crappy container format

@normen said:
the crappy container format

That is not true. The "framerate" variable is hardcoded to 30 in the VideoRecorderAppState, all you have to do is create a setter method for it.
@Momoko_Fan said:
That is not true. The "framerate" variable is hardcoded to 30 in the VideoRecorderAppState, all you have to do is create a setter method for it.


And put in it's docs that the framerate can only be changed before it is initialized (better just say attached though).

Or the timer could be updated also, on the setter method of the framerate.

The framerate will always be fixed, if 30 or 60 doesn’t matter, yeah. But encoding 60 jpeg images a second isn’t exactly easy on the CPU so its 30 fps.

Could you tell why it must be always fixed?

the crappy container format

@normen said:
the crappy container format

This is not true. You can set the framerate to a high value such as 120 or 240, and then duplicate frames if the CPU can't keep up. In that case you avoid the cost of encoding an additional frame and also allow more time for the CPU to catch up, by which time you already will have a new frame available.

Also recall that there's no such thing as true "variable framerate". Either way the frames must be synched with your monitor's refresh rate, which for 60 Hz monitors means the frame timecodes must be multiples of 16.66 milliseconds.

Well, my knowledge about AVI is very limited, I didn’t know that it can’t have 60fps videos.

@shirkit said:
Well, my knowledge about AVI is very limited, I didn't know that it can't have 60fps videos.


You didn't ask why it couldn't be 60. You asked why it must be "fixed"... which the alternative is "dynamic" meaning there is no set frame rate. Momoko's post dealt with that issue, though.

Edit: changed a "couldn't" to a "must" because I mistyped.

@pspeed got it, @momoko_fan didn’t :wink: