Skip to content

vllm.multimodal.video_decoders.base

Classes:

Functions:

SampledFramesCharge

Charges the decoded size of sampled video frames to a request budget.

VideoMediaIO installs one with charging_sampled_frames while a loader runs. Decoders call charge_sampled_frames once they know the frame size and the sampled indices, so an oversized sample is rejected before any frame is decoded.

VideoSourceMetadata

Bases: NamedTuple

Metadata describing the encoded video source.

VideoTargetMetadata

Bases: NamedTuple

Metadata describing the requested video sample.

charge_frame_copies(num_copies, frame_bytes)

Charge num_copies copies of a decoded frame of frame_bytes bytes.

Loaders that repeat decoded frames call this before allocating the copies, so the copies count toward the per-request decoded-media budget before they exist.

charge_sampled_frames(num_frames, width, height)

Charge num_frames RGB frames of width x height before decoding.

Raises ValueError when the frames would exceed the per-request decoded-media budget (VLLM_MAX_MEDIA_REQUEST_DECODE_BYTES).

charging_sampled_frames(charge)

Route charge_sampled_frames calls made in this context to charge.

check_frame_pixel_limit(width, height)

Reject video frames exceeding VLLM_MAX_IMAGE_PIXELS.