Rate this Page
★ ★ ★ ★ ★

Frame#

class torchcodec.Frame(data: Tensor, pts_seconds: float, duration_seconds: float)[source]#

A single video frame with associated metadata.

Examples using Frame:

Decoding a video with VideoDecoder

Decoding a video with VideoDecoder

Build your own decoding pipeline

Build your own decoding pipeline

Multi-threaded decoding pipelines

Multi-threaded decoding pipelines
data: Tensor#

The frame data as (3-D torch.Tensor).

duration_seconds: float#

The duration of the frame, in seconds (float).

pts_seconds: float#

The pts of the frame, in seconds (float).