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 class
SampledVideo
SampledVideo
class max.pipelines.context.SampledVideo(frames, indices, info)
Bases: object
The frames kept from a video, and the source they came from.
Frames are held as uint8 (H, W, C) RGB arrays – the form PyAV
produces – and converted on request. frame.to_ndarray("rgb24") is
pixel-identical to frame.to_image().convert("RGB"), so callers that
want images pay only for the wrapper, not a second conversion.
-
Parameters:
array
The sampled frames stacked into a (T, H, W, C) uint8 array.
frames
images
property images: list[Image]
The sampled frames as RGB PIL.Image.Image objects.
indices
info
info: VideoStreamInfo