package ffmpeg-avcodec
Library
Module
Module type
Parameter
Class
Class type
Audio codecs.
type 'mode t = (Avutil.audio, 'mode) codec
Main types for audio codecs.
type id = [
| `None
| `Mpeg1video
| `Mpeg2video
| `H261
| `H263
| `Rv10
| `Rv20
| `Mjpeg
| `Mjpegb
| `Ljpeg
| `Sp5x
| `Jpegls
| `Mpeg4
| `Rawvideo
| `Msmpeg4v1
| `Msmpeg4v2
| `Msmpeg4v3
| `Wmv1
| `Wmv2
| `H263p
| `H263i
| `Flv1
| `Svq1
| `Svq3
| `Dvvideo
| `Huffyuv
| `Cyuv
| `H264
| `Indeo3
| `Vp3
| `Theora
| `Asv1
| `Asv2
| `Ffv1
| `_4xm
| `Vcr1
| `Cljr
| `Mdec
| `Roq
| `Interplay_video
| `Xan_wc3
| `Xan_wc4
| `Rpza
| `Cinepak
| `Ws_vqa
| `Msrle
| `Msvideo1
| `Idcin
| `_8bps
| `Smc
| `Flic
| `Truemotion1
| `Vmdvideo
| `Mszh
| `Zlib
| `Qtrle
| `Tscc
| `Ulti
| `Qdraw
| `Vixl
| `Qpeg
| `Png
| `Ppm
| `Pbm
| `Pgm
| `Pgmyuv
| `Pam
| `Ffvhuff
| `Rv30
| `Rv40
| `Vc1
| `Wmv3
| `Loco
| `Wnv1
| `Aasc
| `Indeo2
| `Fraps
| `Truemotion2
| `Bmp
| `Cscd
| `Mmvideo
| `Zmbv
| `Avs
| `Smackvideo
| `Nuv
| `Kmvc
| `Flashsv
| `Cavs
| `Jpeg2000
| `Vmnc
| `Vp5
| `Vp6
| `Vp6f
| `Targa
| `Dsicinvideo
| `Tiertexseqvideo
| `Tiff
| `Gif
| `Dxa
| `Dnxhd
| `Thp
| `Sgi
| `C93
| `Bethsoftvid
| `Ptx
| `Txd
| `Vp6a
| `Amv
| `Vb
| `Pcx
| `Sunrast
| `Indeo4
| `Indeo5
| `Mimic
| `Rl2
| `Escape124
| `Dirac
| `Bfi
| `Cmv
| `Motionpixels
| `Tgv
| `Tgq
| `Tqi
| `Aura
| `Aura2
| `V210x
| `Tmv
| `V210
| `Dpx
| `Mad
| `Frwu
| `Flashsv2
| `Cdgraphics
| `R210
| `Anm
| `Binkvideo
| `Iff_ilbm
| `Kgv1
| `Yop
| `Vp8
| `Pictor
| `Ansi
| `A64_multi
| `A64_multi5
| `R10k
| `Mxpeg
| `Lagarith
| `Prores
| `Jv
| `Dfa
| `Wmv3image
| `Vc1image
| `Utvideo
| `Bmv_video
| `Vble
| `Dxtory
| `V410
| `Xwd
| `Cdxl
| `Xbm
| `Zerocodec
| `Mss1
| `Msa1
| `Tscc2
| `Mts2
| `Cllc
| `Mss2
| `Vp9
| `Aic
| `Escape130
| `G2m
| `Webp
| `Hnm4_video
| `Hevc
| `Fic
| `Alias_pix
| `Brender_pix
| `Paf_video
| `Exr
| `Vp7
| `Sanm
| `Sgirle
| `Mvc1
| `Mvc2
| `Hqx
| `Tdsc
| `Hq_hqa
| `Hap
| `Dds
| `Dxv
| `Screenpresso
| `Rscc
| `Avs2
| `Pgx
| `Avs3
| `Msp2
| `Vvc
| `Y41p
| `Avrp
| `_012v
| `Avui
| `Ayuv
| `Targa_y216
| `V308
| `V408
| `Yuv4
| `Avrn
| `Cpia
| `Xface
| `Snow
| `Smvjpeg
| `Apng
| `Daala
| `Cfhd
| `Truemotion2rt
| `M101
| `Magicyuv
| `Sheervideo
| `Ylc
| `Psd
| `Pixlet
| `Speedhq
| `Fmvc
| `Scpr
| `Clearvideo
| `Xpm
| `Av1
| `Bitpacked
| `Mscc
| `Srgc
| `Svg
| `Gdv
| `Fits
| `Imm4
| `Prosumer
| `Mwsc
| `Wcmv
| `Rasc
| `Hymt
| `Arbc
| `Agm
| `Lscr
| `Vp4
| `Imm5
| `Mvdv
| `Mvha
| `Cdtoons
| `Mv30
| `Notchlc
| `Pfm
| `Mobiclip
| `Photocd
| `Ipu
| `Argo
| `Cri
| `Simbiosis_imx
| `Sga_video
| `Gem
| `Vbn
| `Jpegxl
| `Qoi
| `Phm
| `First_audio
| `Pcm_s16le
| `Pcm_s16be
| `Pcm_u16le
| `Pcm_u16be
| `Pcm_s8
| `Pcm_u8
| `Pcm_mulaw
| `Pcm_alaw
| `Pcm_s32le
| `Pcm_s32be
| `Pcm_u32le
| `Pcm_u32be
| `Pcm_s24le
| `Pcm_s24be
| `Pcm_u24le
| `Pcm_u24be
| `Pcm_s24daud
| `Pcm_zork
| `Pcm_s16le_planar
| `Pcm_dvd
| `Pcm_f32be
| `Pcm_f32le
| `Pcm_f64be
| `Pcm_f64le
| `Pcm_bluray
| `Pcm_lxf
| `S302m
| `Pcm_s8_planar
| `Pcm_s24le_planar
| `Pcm_s32le_planar
| `Pcm_s16be_planar
| `Pcm_s64le
| `Pcm_s64be
| `Pcm_f16le
| `Pcm_f24le
| `Pcm_vidc
| `Pcm_sga
| `Adpcm_ima_qt
| `Adpcm_ima_wav
| `Adpcm_ima_dk3
| `Adpcm_ima_dk4
| `Adpcm_ima_ws
| `Adpcm_ima_smjpeg
| `Adpcm_ms
| `Adpcm_4xm
| `Adpcm_xa
| `Adpcm_adx
| `Adpcm_ea
| `Adpcm_g726
| `Adpcm_ct
| `Adpcm_swf
| `Adpcm_yamaha
| `Adpcm_sbpro_4
| `Adpcm_sbpro_3
| `Adpcm_sbpro_2
| `Adpcm_thp
| `Adpcm_ima_amv
| `Adpcm_ea_r1
| `Adpcm_ea_r3
| `Adpcm_ea_r2
| `Adpcm_ima_ea_sead
| `Adpcm_ima_ea_eacs
| `Adpcm_ea_xas
| `Adpcm_ea_maxis_xa
| `Adpcm_ima_iss
| `Adpcm_g722
| `Adpcm_ima_apc
| `Adpcm_vima
| `Adpcm_afc
| `Adpcm_ima_oki
| `Adpcm_dtk
| `Adpcm_ima_rad
| `Adpcm_g726le
| `Adpcm_thp_le
| `Adpcm_psx
| `Adpcm_aica
| `Adpcm_ima_dat4
| `Adpcm_mtaf
| `Adpcm_agm
| `Adpcm_argo
| `Adpcm_ima_ssi
| `Adpcm_zork
| `Adpcm_ima_apm
| `Adpcm_ima_alp
| `Adpcm_ima_mtf
| `Adpcm_ima_cunning
| `Adpcm_ima_moflex
| `Adpcm_ima_acorn
| `Amr_nb
| `Amr_wb
| `Ra_144
| `Ra_288
| `Roq_dpcm
| `Interplay_dpcm
| `Xan_dpcm
| `Sol_dpcm
| `Sdx2_dpcm
| `Gremlin_dpcm
| `Derf_dpcm
| `Mp2
| `Mp3
| `Aac
| `Ac3
| `Dts
| `Vorbis
| `Dvaudio
| `Wmav1
| `Wmav2
| `Mace3
| `Mace6
| `Vmdaudio
| `Flac
| `Mp3adu
| `Mp3on4
| `Shorten
| `Alac
| `Westwood_snd1
| `Gsm
| `Qdm2
| `Cook
| `Truespeech
| `Tta
| `Smackaudio
| `Qcelp
| `Wavpack
| `Dsicinaudio
| `Imc
| `Musepack7
| `Mlp
| `Gsm_ms
| `Atrac3
| `Ape
| `Nellymoser
| `Musepack8
| `Speex
| `Wmavoice
| `Wmapro
| `Wmalossless
| `Atrac3p
| `Eac3
| `Sipr
| `Mp1
| `Twinvq
| `Truehd
| `Mp4als
| `Atrac1
| `Binkaudio_rdft
| `Binkaudio_dct
| `Aac_latm
| `Qdmc
| `Celt
| `G723_1
| `G729
| `_8svx_exp
| `_8svx_fib
| `Bmv_audio
| `Ralf
| `Iac
| `Ilbc
| `Opus
| `Comfort_noise
| `Tak
| `Metasound
| `Paf_audio
| `On2avc
| `Dss_sp
| `Codec2
| `Ffwavesynth
| `Sonic
| `Sonic_ls
| `Evrc
| `Smv
| `Dsd_lsbf
| `Dsd_msbf
| `Dsd_lsbf_planar
| `Dsd_msbf_planar
| `_4gv
| `Interplay_acm
| `Xma1
| `Xma2
| `Dst
| `Atrac3al
| `Atrac3pal
| `Dolby_e
| `Aptx
| `Aptx_hd
| `Sbc
| `Atrac9
| `Hcom
| `Acelp_kelvin
| `Mpegh_3d_audio
| `Siren
| `Hca
| `Fastaudio
| `Msnsiren
| `Dfpwm
]
Audio codec ids. Careful: different codecs share the same ID, e.g. aac and libfdk_aac
Find an encoder from its name.
Raise Error if the codec is not found or is not an audio codec.
Find an encoder from its id.
Raise Error if the codec is not found or is not an audio codec.
Find a decoder from its name.
Raise Error if the codec is not found or is not an audio codec.
Find a decoder from its id.
Raise Error if the codec is not found or is not an audio codec.
val get_supported_channel_layouts : _ t -> Avutil.Channel_layout.t list
Return the list of supported channel layouts of the codec.
val find_best_channel_layout :
_ t ->
Avutil.Channel_layout.t ->
Avutil.Channel_layout.t
Avcodec.Audio.find_best_channel_layout codec default
return the best channel layout of the codec
codec or the default
value if the codec has no channel layout.
val get_supported_sample_formats : _ t -> Avutil.Sample_format.t list
Return the list of supported sample formats of the codec.
val find_best_sample_format :
_ t ->
Avutil.Sample_format.t ->
Avutil.Sample_format.t
Avcodec.Audio.find_best_sample_format codec default
return the best sample format of the codec
codec or the default
value if the codec has no sample format.
val get_supported_sample_rates : _ t -> int list
Return the list of supported sample rates of the codec.
val find_best_sample_rate : _ t -> int -> int
Avcodec.Audio.find_best_sample_rate codec default
return the best sample rate of the codec
codec or the default
value if the codec has no sample rate.
val create_parser :
?params:Avutil.audio params ->
decode t ->
Avutil.audio Packet.parser
Avcodec.Audio.create_parser codec
create an audio packet parser.
Raise Error if the parser creation failed.
val create_decoder :
?params:Avutil.audio params ->
decode t ->
Avutil.audio decoder
Avcodec.Audio.create_decoder ~params codec
create an audio decoder.
Raise Error if the decoder creation failed.
val sample_format : Avutil.audio decoder -> Avutil.Sample_format.t
Avcodec.Audio.sample_format decoder
returns the output sample format for the given decoder.
val create_encoder :
?opts:Avutil.opts ->
?channels:int ->
?channel_layout:Avutil.Channel_layout.t ->
sample_rate:int ->
sample_format:Avutil.Sample_format.t ->
time_base:Avutil.rational ->
encode t ->
Avutil.audio encoder
Avcodec.Audio.create_encoder
create an audio encoder.
Params have the same semantics as in Av.new_audio_stream
Raise Error if the encoder creation failed.
val frame_size : Avutil.audio encoder -> int
Get the desired frame_size for this encoder.
val string_of_id : id -> string
Return the name of the codec ID.
val get_params_id : Avutil.audio params -> id
Return the id of the codec params.
val get_channel_layout : Avutil.audio params -> Avutil.Channel_layout.t
Return the channel layout set for the codec params.
val get_nb_channels : Avutil.audio params -> int
Returns the number of channels set for the codec params.
val get_sample_format : Avutil.audio params -> Avutil.Sample_format.t
Returns the sample format set for the codec params.
val get_bit_rate : Avutil.audio params -> int
Returns the bit rate set for the codec params.
val get_sample_rate : Avutil.audio params -> int
Returns the sample rate set for the codec.