spdl.io.VideoPackets¶
- class VideoPackets[source]¶
Packets object containing video frames.
Methods
clone
()Clone the packets, so that data can be decoded multiple times.
Attributes
The frame rate of the video in the form of
(numerator, denominator)
.The height of video.
The name of the pixel format, such as
"yuv420p"
.The window this packets covers, denoted by start and end time in second.
The width of video.
- __len__() int [source]¶
Returns the number of packets.
Note
Each packet typically contains one compressed frame, but it is not guaranteed.
- clone() VideoPackets [source]¶
Clone the packets, so that data can be decoded multiple times.
- Returns:
A clone of the packets.
- property frame_rate: tuple[int, int][source]¶
The frame rate of the video in the form of
(numerator, denominator)
.