IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python function

plan_frame_indices

plan_frame_indices()​

max.pipelines.context.plan_frame_indices(total_frames, fps, *, num_frames=None, target_fps=None, sampling='uniform', start_frame=None, end_frame=None, min_frames=1, max_frames=None, rounding='round')

source

Predicts which frames decode_video_frames() would keep.

Same policy arguments, no decoding, so a caller can size the result before committing to it – for instance to reject a request from the container header alone rather than after paying for the decode. The decoded-byte budget is not applied here, so this is an upper bound on the sample.

Parameters:

Returns:

The source frame indices that would be sampled.

Return type:

list[int]