Frames

class av.frame.Frame

Bases: object

Base class for audio and video frames.

See also AudioFrame and VideoFrame.

dts

The decoding timestamp copied from the Packet that triggered returning this frame in time_base units.

(if frame threading isn’t used) This is also the Presentation time of this frame calculated from only Packet.dts values without pts values.

Type:

int

is_corrupt

Is this frame corrupt?

Type:

bool

make_writable()

Ensures that the frame data is writable. Copy the data to new buffer if it is not. This is a wrapper around av_frame_make_writable.

opaque
pts

The presentation timestamp in time_base units for this frame.

This is the time at which the frame should be shown to the user.

Type:

int

side_data
time

The presentation time in seconds for this frame.

This is the time at which the frame should be shown to the user.

Type:

float

time_base

The unit of time (in fractional seconds) in which timestamps are expressed.

Type:

fractions.Fraction