Codecs¶
-
class
av.codec.codec.Codec¶ Bases:
objectA single encoding or decoding codec.
This object exposes information about an availible codec, and an avenue to create a
CodecContextto encode/decode directly.>>> codec = Codec('mpeg4', 'r') >>> codec.name 'mpeg4' >>> codec.type 'video' >>> codec.is_encoder False
-
audio_formats¶ A list of supported audio formats, or None.
Type: list of AudioFormat
-
audio_rates¶ A list of supported audio sample rates, or None.
Type: list of int
-
auto_threads¶
-
bitmap_sub¶
-
channel_conf¶
-
create()¶
-
delay¶
-
descriptor¶
-
dr1¶
-
draw_horiz_band¶
-
experimental¶
-
frame_rates¶ A list of supported frame rates, or None.
Type: list of fractions.Fraction
-
frame_threads¶
-
hwaccel¶
-
hwaccel_vdpau¶
-
id¶
-
intra_only¶
-
is_decoder¶
-
is_encoder¶
-
long_name¶
-
lossless¶
-
lossy¶
-
name¶
-
neg_linesizes¶
-
param_change¶
-
reorder¶
-
slice_threads¶
-
small_last_frame¶
-
subframes¶
-
text_sub¶
-
truncated¶
-
variable_frame_size¶
-
video_formats¶ A list of supported video formats, or None.
Type: list of VideoFormat
-
-
class
av.codec.context.CodecContext¶ Bases:
object-
bit_rate¶
-
bit_rate_tolerance¶
-
close(bool strict=True)¶
-
codec¶
-
static
create(codec, mode=None)¶
-
decode(Packet packet=None, unsigned int count=0, bool prefer_send_recv=True)¶ Decode a list of
Framefrom the givenPacket.If the packet is None, the buffers will be flushed. This is useful if you do not want the library to automatically re-order frames for you (if they are encoded with a codec that has B-frames).
-
encode(Frame frame=None, unsigned int count=0, bool prefer_send_recv=True)¶
-
extradata¶
-
extradata_size¶
-
is_decoder¶
-
is_encoder¶
-
is_open¶
-
max_bit_rate¶
-
name¶
-
open(bool strict=True)¶
-
options¶ options: dict
-
parse(str input_, allow_stream=False)¶
-
profile¶
-
skip_frame¶
-
thread_count¶
-
thread_type¶
-
ticks_per_frame¶
-
time_base¶
-
type¶
-