package ffmpeg-avutil

  1. Overview
  2. Docs

Formats for channels layouts.

type t = [
  1. | `Native
  2. | `Mono
  3. | `Stereo
  4. | `_2point1
  5. | `_2_1
  6. | `Surround
  7. | `_3point1
  8. | `_4point0
  9. | `_4point1
  10. | `_2_2
  11. | `Quad
  12. | `_5point0
  13. | `_5point1
  14. | `_5point0_back
  15. | `_5point1_back
  16. | `_6point0
  17. | `_6point0_front
  18. | `Hexagonal
  19. | `_6point1
  20. | `_6point1_back
  21. | `_6point1_front
  22. | `_7point0
  23. | `_7point0_front
  24. | `_7point1
  25. | `_7point1_wide
  26. | `_7point1_wide_back
  27. | `Octagonal
  28. | `Hexadecagonal
  29. | `Stereo_downmix
  30. | `_22point2
]

Channel layout formats.

val find : string -> t

Return a channel layout id that matches name. Raises Not_found otherwise. name can be one or several of the following notations, separated by '+' or '|':

  • the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0, 5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
  • the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC, SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
  • a number of channels, in decimal, optionally followed by 'c', yielding the default channel layout for that number of channels;
  • a channel layout mask, in hexadecimal starting with "0x" (see the AV_CH_* macros).
val get_description : ?channels:int -> t -> string

Return a description of the channel layout.

val get_nb_channels : t -> int

Return the number of channels in the channel layout.

val get_default : int -> t

Return default channel layout for a given number of channels. Raises Not_found if not found.

val get_id : t -> int64

Return the internal ID for a channel layout. This number should be passed as the "channel_layout" opts in Av.new_audio_stream .