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

probe_video

probe_video()​

max.pipelines.context.probe_video(source)

source

Reads a video’s header without decoding any frame.

Parameters:

source (str | bytes) – The video to probe.

Returns:

The stream metadata. num_frames is the header’s best-effort count and may be 0 or simply wrong; decode_video_frames() corrects it against the frames a decode actually produces.

Raises:

MediaDecodeError – If the source is not a readable video.

Return type:

VideoStreamInfo