Library
Module
Module type
Parameter
Class
Class type
This module contains decoders and encoders for audio, video and subtitle codecs.
val time_base : 'media encoder -> Avutil.rational
Get the time base of a given encoder.
val name : (_, _) codec -> string
Get the name of a given codec.
type capability = [
| `Draw_horiz_band
| `Dr1
| `Truncated
| `Delay
| `Small_last_frame
| `Subframes
| `Experimental
| `Channel_conf
| `Frame_threads
| `Slice_threads
| `Param_change
| `Other_threads
| `Auto_threads
| `Variable_frame_size
| `Avoid_probing
| `Intra_only
| `Lossless
| `Hardware
| `Hybrid
| `Encoder_reordered_opaque
| `Encoder_flush
]
Codec capabilities.
val capabilities : ([< `Audio | `Video ], encode) codec -> capability list
Get the encoding capabilities for this codec.
Codec hardware config method.
type hw_config = {
pixel_format : Avutil.Pixel_format.t;
methods : hw_config_method list;
device_type : Avutil.HwContext.device_type;
}
Hardward config for the given codec.
module Packet : sig ... end
Packet.
module Audio : sig ... end
Audio codecs.
module Video : sig ... end
Video codecs.
module Subtitle : sig ... end
Subtitle codecs.
val decode :
'media decoder ->
('media Avutil.frame -> unit) ->
'media Packet.t ->
unit
Avcodec.decode decoder f packet
applies function f
to the decoded frames frome the packet
according to the decoder
configuration.
Raise Error if the decoding failed.
val flush_decoder : 'media decoder -> ('media Avutil.frame -> unit) -> unit
Avcodec.flush_decoder decoder f
applies function f
to the decoded frames frome the buffered packets in the decoder
.
Raise Error if the decoding failed.
val encode :
'media encoder ->
('media Packet.t -> unit) ->
'media Avutil.frame ->
unit
Avcodec.encode encoder f frame
applies function f
to the encoded packets from the frame
according to the encoder
configuration.
Raise Error if the encoding failed.