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, default_fps=30.0)

source

Reads a video’s header without decoding any frame.

Parameters:

  • source (str | bytes) – The video to probe.
  • default_fps (float) – Frame rate assumed when the container declares none, to estimate the frame count from the duration. Pass the rate the caller indexes frames at, or its targets miss the real stream.

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