vllm.multimodal.video ¶
OpenCVDynamicVideoBackend ¶
Bases: OpenCVVideoBackend
Source code in vllm/multimodal/video.py
load_bytes classmethod ¶
load_bytes(
data: bytes,
num_frames: int = -1,
fps: int = 2,
max_duration: int = 300,
**kwargs,
) -> tuple[NDArray, dict[str, Any]]
Source code in vllm/multimodal/video.py
OpenCVVideoBackend ¶
Bases: VideoLoader
Source code in vllm/multimodal/video.py
get_cv2_video_api ¶
Source code in vllm/multimodal/video.py
load_bytes classmethod ¶
load_bytes(
data: bytes,
num_frames: int = -1,
fps: int = -1,
**kwargs,
) -> tuple[NDArray, dict[str, Any]]
Source code in vllm/multimodal/video.py
VideoLoader ¶
Source code in vllm/multimodal/video.py
_read_frames staticmethod ¶
_read_frames(
cap,
frame_indices: set[int],
num_expected_frames: int,
max_frame_idx: int,
) -> tuple[NDArray, int, list[int]]
Source code in vllm/multimodal/video.py
load_bytes abstractmethod classmethod ¶
VideoMediaIO ¶
Source code in vllm/multimodal/video.py
__init__ ¶
__init__(
image_io: ImageMediaIO, num_frames: int = 32, **kwargs
) -> None