cutcutcodec.core.analysis.stream.rate_video.optimal_rate_video
- cutcutcodec.core.analysis.stream.rate_video.optimal_rate_video(stream: StreamVideo, t_min: Fraction | None = None, t_max: Fraction | float | None = None, choices: set[Fraction] | None = None) Fraction[source]
Find the optimal frame rate for a given video stream.
Parameters
- streamcutcutcodec.core.classes.stream_video.StreamVideo
The video stream that we want to find the optimal fps.
- t_minfloat, optional
The lower bound of the time slice estimation.
- t_maxfloat, optional
The higher bound of the time slice estimation.
- choicesset[Fraction], optional
The possible fps. If provide, returns the most appropriate fps of this set.
Returns
- frameratenumbers.Real
The framerate (maximum) that allows to minimize / cancel the loss of information, (minimum) and avoids an excess of frame that does not bring more information.