Skip to content

vllm.multimodal.media.video

Classes:

VideoEmbeddingMediaIO

Bases: MediaIO[Tensor]

Video embedding MediaIO implementation.

Configuration values can be user-provided either by --media-io-kwargs or by the runtime API field "media_io_kwargs". Ensure proper validation and error handling.

VideoMediaIO

Bases: MediaIO[MediaWithBytes[tuple[DecodedFrames, dict[str, Any]]]]

Configuration values can be user-provided either by --media-io-kwargs or by the runtime API field "media_io_kwargs". Ensure proper validation and error handling.

Use --media-io-kwargs '{"video": {"backend": "torchcodec", "device": "cuda"}}' to decode with NVDEC and keep frames on the GPU, which pairs with a device-side multi-modal processor (--mm-processor-device, EPD encode-only instances).

_frame_to_hwc(frame)

Convert a frame loaded by ImageMediaIO to an HWC array.