| 1 |
from fractions import Fraction |
| 2 |
from typing import Iterator, Literal |
| 3 |
|
| 4 |
from av.codec.context import CodecContext |
| 5 |
from av.packet import Packet |
| 6 |
|
| 7 |
from .format import VideoFormat |
| 8 |
from .frame import VideoFrame |
| 9 |
|
| 10 |
class VideoCodecContext(CodecContext): |
| 11 |
format: VideoFormat | None |
| 12 |
width: int |
| 13 |
height: int |
| 14 |
bits_per_coded_sample: int |
| 15 |
pix_fmt: str | None |
| 16 |
framerate: Fraction |
| 17 |
rate: Fraction |
| 18 |
gop_size: int |
| 19 |
sample_aspect_ratio: Fraction | None |
| 20 |
display_aspect_ratio: Fraction | None |
| 21 |
has_b_frames: bool |
| 22 |
reorder_depth: int |
| 23 |
max_b_frames: int |
| 24 |
coded_width: int |
| 25 |
coded_height: int |
| 26 |
color_range: int |
| 27 |
color_primaries: int |
| 28 |
color_trc: int |
| 29 |
colorspace: int |
| 30 |
qmin: int |
| 31 |
qmax: int |
| 32 |
type: Literal["video"] |
| 33 |
|
| 34 |
def encode(self, frame: VideoFrame | None = None) -> list[Packet]: ... |
| 35 |
def encode_lazy(self, frame: VideoFrame | None = None) -> Iterator[Packet]: ... |
| 36 |
def decode(self, packet: Packet | None = None) -> list[VideoFrame]: ... |