pub(crate) fn decode_frames_dropping(
frame_prefix: &str,
video_path: impl AsRef<Path>,
frames_path: impl AsRef<Path>,
) -> Result<()>
Expand description
Decodes video frames by dropping frames according to
FRAMES_BETWEEN_EXTRACTED
constant.
This function implements the basic frame extraction method that processes
videos sequentially. It’s memory-efficient and works well for smaller
videos or single-core processing. The FRAMES_BETWEEN_EXTRACTED
constant
determines which frames are extracted (e.g., every 30th frame for 30fps
video = 1fps output).
§Arguments
frame_prefix
- String prefix for output PNG filenames (e.g., “segment-1” creates “segment-1_0.png”)video_path
- Source video file to decodeframes_path
- Directory where PNG frame images will be saved
§Performance Notes
- Frames are processed in decode order without seeking (faster)
- Memory usage scales with
FRAMES_BETWEEN_EXTRACTED
value (lower = more memory) - Single-threaded operation unless called within parallel context