cutcutcodec.core.analysis.stream.rate_video
Smartly choose the framerate of a video stream.
Functions
|
Find the optimal frame rate for a given video stream. |
Details
- cutcutcodec.core.analysis.stream.rate_video.optimal_rate_video(stream: StreamVideo, 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.
- 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.