package ffmpeg-avcodec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Subtitle codecs.

type 'mode t = (Avutil.subtitle, 'mode) codec

Main subtitle types.

type id = [
  1. | `Dvd_subtitle
  2. | `Dvb_subtitle
  3. | `Text
  4. | `Xsub
  5. | `Ssa
  6. | `Mov_text
  7. | `Hdmv_pgs_subtitle
  8. | `Dvb_teletext
  9. | `Srt
  10. | `Microdvd
  11. | `Eia_608
  12. | `Jacosub
  13. | `Sami
  14. | `Realtext
  15. | `Stl
  16. | `Subviewer1
  17. | `Subviewer
  18. | `Subrip
  19. | `Webvtt
  20. | `Mpl2
  21. | `Vplayer
  22. | `Pjs
  23. | `Ass
  24. | `Hdmv_text_subtitle
  25. | `Ttml
  26. | `Arib_caption
]

Subtitle 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 : [ `Dvd_subtitle | `Dvb_subtitle | `Text | `Xsub | `Ssa | `Mov_text | `Hdmv_pgs_subtitle | `Dvb_teletext | `Srt | `Microdvd | `Eia_608 | `Jacosub | `Sami | `Realtext | `Stl | `Subviewer1 | `Subviewer | `Subrip | `Webvtt | `Mpl2 | `Vplayer | `Pjs | `Ass | `Hdmv_text_subtitle | `Ttml | `Arib_caption ] list

List all subtitle codec IDs.

val encoders : encode t list

List of all available subtitle encoders.

val decoders : decode t list

List of all available subtitle decoders.

val find_encoder_by_name : string -> encode t

Find an encoder from its name.

Raise Error if the codec is not found or is not an audio codec.

val find_encoder : id -> encode t

Find an encoder from its id.

Raise Error if the codec is not found or is not an audio codec.

val find_decoder_by_name : string -> decode t

Find a decoder from its name.

Raise Error if the codec is not found or is not an audio codec.

val find_decoder : id -> decode t

Find a decoder from its id.

Raise Error if the codec is not found or is not an audio codec.

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_id : _ t -> id

Return the ID (class) of a codec.

val get_params_id : Avutil.subtitle params -> id

Return the id of the codec params.