vllm.multimodal.video_decoders.opencv
¶
Classes:
OpenCVVideoBackendMixin
¶
Methods:
-
demux_count_frames–Count frames with OpenCV's demuxer-only mode.
_can_use_for_recovery(idx, failed_frames, next_target_map, total_frames)
classmethod
¶
Check if current frame can recover the oldest failed frame.
_read_frames_with_recovery(cap, frame_indices, total_frames)
classmethod
¶
Read frames with dynamic window forward-scan recovery.
When a target frame fails to load, the next successfully grabbed frame (before the next target frame) will be used to recover it.
Parameters:
-
(cap¶VideoCapture) –OpenCV VideoCapture object
-
(frame_indices¶list[int]) –Sorted list of target frame indices to load
-
(total_frames¶int) –Total number of frames in the video
Returns:
demux_count_frames(data)
classmethod
¶
Count frames with OpenCV's demuxer-only mode.