Skip to main content

FrameBatch

Decoded frames with the alignment data a video model reads beside them: frames, a host uint8 Tensor of shape [K, H, W, 3] (channels-last RGB; move it with .to()), indices, the source frame index of each row, pts_seconds, each frame's presentation time on the clip's own timeline (offsets and uneven spacing included), and duration_seconds, each frame's display duration. len() is K; batch[k] is a one-frame FrameBatch whose frames is a view of row k (no pixel copied), so the batch iterates frame by frame.

duration_seconds (property)​

Each frame's display duration in seconds.

frames (property)​

The packed frames, a host uint8 Tensor of shape [K, H, W, 3].

indices (property)​

The source frame index of each row, in order.

pts_seconds (property)​

Each frame's presentation time in seconds, the container's own timeline.

__init__​

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.