decode_frames

Function decode_frames 

Source
pub fn decode_frames(
    bytes: &[u8],
    target_fps: f32,
    policy: &FfmpegPolicy,
) -> Result<Vec<RgbImage>>
Expand description

Decode bytes to RGB frames sampled at target_fps.

ffmpeg performs the temporal sampling itself (-vf fps=), which is both faster and more accurate than decoding everything and discarding most of it — and it means the caller does not have to know the source frame rate. The returned frames are therefore ALREADY at target_fps.