Avcodec.Video
Video codecs.
type 'mode t = (Avutil.video, 'mode) codec
Main types for video codecs.
type id = [
| `Wrapped_avframe
| `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
| `Radiance_hdr
| `Wbmp
| `Media100
| `Vqc
| `Pdv
| `Evc
| `Rtv1
| `Vmix
]
Video codec ids. Careful: different codecs share the same ID, e.g. aac and libfdk_aac
val descriptor : id -> descriptor option
Get the codec descriptor.
val codec_ids :
[ `Wrapped_avframe
| `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
| `Radiance_hdr
| `Wbmp
| `Media100
| `Vqc
| `Pdv
| `Evc
| `Rtv1
| `Vmix ]
list
List all video codec IDs.
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_frame_rates : _ t -> Avutil.rational list
Return the list of supported frame rates of the codec.
val find_best_frame_rate : _ t -> Avutil.rational -> Avutil.rational
Avcodec.Video.find_best_frame_rate codec default
return the best frame rate of the codec
codec or the default
value if the codec has no frame rate.
val get_supported_pixel_formats : _ t -> Avutil.Pixel_format.t list
Return the list of supported pixel formats of the codec.
val find_best_pixel_format :
?hwaccel:bool ->
_ t ->
Avutil.Pixel_format.t ->
Avutil.Pixel_format.t
Avcodec.Video.find_best_pixel_format codec default
return the best pixel format of the codec
codec or the default
value if the codec has no pixel format.
val create_parser :
?params:Avutil.video params ->
decode t ->
Avutil.video Packet.parser
Avcodec.Video.create_parser codec
create an video packet parser.
Raise Error if the parser creation failed.
val create_decoder :
?params:Avutil.video params ->
decode t ->
Avutil.video decoder
Avcodec.Video.create_decoder codec
create a video decoder.
Raise Error if the decoder creation failed.
type hardware_context = [
| `Device_context of Avutil.HwContext.device_context
| `Frame_context of Avutil.HwContext.frame_context
]
val create_encoder :
?opts:Avutil.opts ->
?frame_rate:Avutil.rational ->
?hardware_context:hardware_context ->
pixel_format:Avutil.Pixel_format.t ->
width:int ->
height:int ->
time_base:Avutil.rational ->
encode t ->
Avutil.video encoder
Avcodec.Video.create_encoder
create a video encoder.
Params have the same semantics as in Av.new_video_stream
Raise Error if the encoder creation failed.
val get_name : (_, _) codec -> string
Return the name of a codec.
val get_description : (_, _) codec -> string
Return the description of a codec.
val string_of_id : id -> string
Return the name of the codec.
val get_params_id : Avutil.video params -> id
Return the id of the codec params.
val get_width : Avutil.video params -> int
Returns the width set for the codec params.
val get_height : Avutil.video params -> int
Returns the height set for the codec params.
val get_sample_aspect_ratio : Avutil.video params -> Avutil.rational
Returns the sample aspect ratio set for the codec params.
val get_pixel_format : Avutil.video params -> Avutil.Pixel_format.t option
Returns the pixel format set for the codec params.
val get_pixel_aspect : Avutil.video params -> Avutil.rational option
Returns the pixel aspect set for the codec params.
val get_bit_rate : Avutil.video params -> int
Returns the bit rate set for the codec.