schema
¶
Schema definitions for code generation.
Classes:
Name | Description |
---|---|
FFMpegAVOption |
An FFmpeg AV option with metadata. |
FFMpegCodec |
Base class for FFmpeg codecs. |
FFMpegDecoder |
An FFmpeg decoder. |
FFMpegDemuxer |
An FFmpeg demuxer. |
FFMpegEncoder |
An FFmpeg encoder. |
FFMpegFormat |
Base class for FFmpeg formats. |
FFMpegMuxer |
An FFmpeg muxer. |
FFMpegOptionChoice |
A choice option for FFmpeg parameters. |
FFMpegAVOption
dataclass
¶
FFMpegAVOption(
*,
section: str,
name: str,
type: str,
flags: str,
help: str,
min: str | None = None,
max: str | None = None,
default: str | None = None,
choices: tuple[FFMpegOptionChoice, ...] = ()
)
Bases: Serializable
An FFmpeg AV option with metadata.
Attributes:
Name | Type | Description |
---|---|---|
code_gen_type |
str
|
Get the code generation type for this option. |
code_gen_type
property
¶
code_gen_type: str
Get the code generation type for this option.
Returns:
Type | Description |
---|---|
str
|
The type string for code generation. |
Raises:
Type | Description |
---|---|
ValueError
|
If the option type is invalid. |
FFMpegCodec
dataclass
¶
FFMpegCodec(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: Serializable
Base class for FFmpeg codecs.
Methods:
Name | Description |
---|---|
filtered_options |
Get the filtered options for this codec. |
Attributes:
Name | Type | Description |
---|---|---|
codec_type |
Literal['video', 'audio', 'subtitle']
|
Get the type of this codec. |
is_decoder |
bool
|
Check if this codec is a decoder. |
is_encoder |
bool
|
Check if this codec is an encoder. |
codec_type
property
¶
codec_type: Literal['video', 'audio', 'subtitle']
Get the type of this codec.
Returns:
Type | Description |
---|---|
Literal['video', 'audio', 'subtitle']
|
The codec type. |
Raises:
Type | Description |
---|---|
ValueError
|
If the stream type is invalid. |
is_decoder
property
¶
is_decoder: bool
Check if this codec is a decoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is a decoder, False otherwise. |
is_encoder
property
¶
is_encoder: bool
Check if this codec is an encoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is an encoder, False otherwise. |
filtered_options
¶
filtered_options() -> Iterable[FFMpegAVOption]
Get the filtered options for this codec.
Returns:
Type | Description |
---|---|
Iterable[FFMpegAVOption]
|
An iterable of filtered options. |
FFMpegDecoder
dataclass
¶
FFMpegDecoder(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: FFMpegCodec
An FFmpeg decoder.
Methods:
Name | Description |
---|---|
filtered_options |
Get the filtered options for this codec. |
Attributes:
Name | Type | Description |
---|---|---|
codec_type |
Literal['video', 'audio', 'subtitle']
|
Get the type of this codec. |
is_decoder |
bool
|
Check if this codec is a decoder. |
is_encoder |
bool
|
Check if this codec is an encoder. |
codec_type
property
¶
codec_type: Literal['video', 'audio', 'subtitle']
Get the type of this codec.
Returns:
Type | Description |
---|---|
Literal['video', 'audio', 'subtitle']
|
The codec type. |
Raises:
Type | Description |
---|---|
ValueError
|
If the stream type is invalid. |
is_decoder
property
¶
is_decoder: bool
Check if this codec is a decoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is a decoder, False otherwise. |
is_encoder
property
¶
is_encoder: bool
Check if this codec is an encoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is an encoder, False otherwise. |
filtered_options
¶
filtered_options() -> Iterable[FFMpegAVOption]
Get the filtered options for this codec.
Returns:
Type | Description |
---|---|
Iterable[FFMpegAVOption]
|
An iterable of filtered options. |
FFMpegDemuxer
dataclass
¶
FFMpegDemuxer(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: FFMpegFormat
An FFmpeg demuxer.
Attributes:
Name | Type | Description |
---|---|---|
is_demuxer |
bool
|
Check if this format is a demuxer. |
is_muxer |
bool
|
Check if this format is a muxer. |
FFMpegEncoder
dataclass
¶
FFMpegEncoder(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: FFMpegCodec
An FFmpeg encoder.
Methods:
Name | Description |
---|---|
filtered_options |
Get the filtered options for this codec. |
Attributes:
Name | Type | Description |
---|---|---|
codec_type |
Literal['video', 'audio', 'subtitle']
|
Get the type of this codec. |
is_decoder |
bool
|
Check if this codec is a decoder. |
is_encoder |
bool
|
Check if this codec is an encoder. |
codec_type
property
¶
codec_type: Literal['video', 'audio', 'subtitle']
Get the type of this codec.
Returns:
Type | Description |
---|---|
Literal['video', 'audio', 'subtitle']
|
The codec type. |
Raises:
Type | Description |
---|---|
ValueError
|
If the stream type is invalid. |
is_decoder
property
¶
is_decoder: bool
Check if this codec is a decoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is a decoder, False otherwise. |
is_encoder
property
¶
is_encoder: bool
Check if this codec is an encoder.
Returns:
Type | Description |
---|---|
bool
|
True if this is an encoder, False otherwise. |
filtered_options
¶
filtered_options() -> Iterable[FFMpegAVOption]
Get the filtered options for this codec.
Returns:
Type | Description |
---|---|
Iterable[FFMpegAVOption]
|
An iterable of filtered options. |
FFMpegFormat
dataclass
¶
FFMpegFormat(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: Serializable
Base class for FFmpeg formats.
Attributes:
Name | Type | Description |
---|---|---|
is_demuxer |
bool
|
Check if this format is a demuxer. |
is_muxer |
bool
|
Check if this format is a muxer. |
FFMpegMuxer
dataclass
¶
FFMpegMuxer(
*,
name: str,
flags: str,
description: str,
options: tuple[FFMpegAVOption, ...] = ()
)
Bases: FFMpegFormat
An FFmpeg muxer.
Attributes:
Name | Type | Description |
---|---|---|
is_demuxer |
bool
|
Check if this format is a demuxer. |
is_muxer |
bool
|
Check if this format is a muxer. |
FFMpegOptionChoice
dataclass
¶
FFMpegOptionChoice(
*, name: str, help: str, flags: str, value: str
)