From a3505136f966080b31ca6ccfb2480485d4305204 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Fri, 18 Oct 2013 11:21:21 +0200 Subject: [PATCH] doc/utils: document channel layout specification --- doc/utils.texi | 148 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/doc/utils.texi b/doc/utils.texi index 16101f018f..937713902a 100644 --- a/doc/utils.texi +++ b/doc/utils.texi @@ -579,6 +579,154 @@ The following names of colors are recognized: 0x9ACD32 @end table +@anchor{channel layout syntax} +@section Channel Layout + +A channel layout specifies the spatial disposition of the channels in +a multi-channel audio stream. To specify a channel layout, FFmpeg +makes use of a special syntax. + +Individual channels are identified by an id, as given by the table +below: +@table @samp +@item FL +front left +@item FR +front right +@item FC +front center +@item LFE +low frequency +@item BL +back left +@item BR +back right +@item FLC +front left-of-center +@item FRC +front right-of-center +@item BC +back center +@item SL +side left +@item SR +side right +@item TC +top center +@item TFL +top front left +@item TFC +top front center +@item TFR +top front right +@item TBL +top back left +@item TBC +top back center +@item TBR +top back right +@item DL +downmix left +@item DR +downmix right +@item WL +wide left +@item WR +wide right +@item SDL +surround direct left +@item SDR +surround direct right +@item LFE2 +low frequency 2 +@end table + +Standard channel layout compositions can be specified by using the +following identifiers: +@table @samp +@item mono +FC +@item stereo +FL+FR +@item 2.1 +FL+FR+LFE +@item 3.0 +FL+FR+FC +@item 3.0(back) +FL+FR+BC +@item 4.0 +FL+FR+FC+BC +@item quad +FL+FR+BL+BR +@item quad(side) +FL+FR+SL+SR +@item 3.1 +FL+FR+FC+LFE +@item 5.0 +FL+FR+FC+BL+BR +@item 5.0(side) +FL+FR+FC+SL+SR +@item 4.1 +FL+FR+FC+LFE+BC +@item 5.1 +FL+FR+FC+LFE+BL+BR +@item 5.1(side) +FL+FR+FC+LFE+SL+SR +@item 6.0 +FL+FR+FC+BC+SL+SR +@item 6.0(front) +FL+FR+FLC+FRC+SL+SR +@item hexagonal +FL+FR+FC+BL+BR+BC +@item 6.1 +FL+FR+FC+LFE+BC+SL+SR +@item 6.1 +FL+FR+FC+LFE+BL+BR+BC +@item 6.1(front) +FL+FR+LFE+FLC+FRC+SL+SR +@item 7.0 +FL+FR+FC+BL+BR+SL+SR +@item 7.0(front) +FL+FR+FC+FLC+FRC+SL+SR +@item 7.1 +FL+FR+FC+LFE+BL+BR+SL+SR +@item 7.1(wide) +FL+FR+FC+LFE+BL+BR+FLC+FRC +@item 7.1(wide-side) +FL+FR+FC+LFE+FLC+FRC+SL+SR +@item octagonal +FL+FR+FC+BL+BR+BC+SL+SR +@item downmix +DL+DR +@end table + +A custom channel layout can be specified as a sequence of terms, separated by +'+' or '|'. Each term can be: +@itemize +@item +the name of a standard channel layout (e.g. @samp{mono}, +@samp{stereo}, @samp{4.0}, @samp{quad}, @samp{5.0}, etc.) + +@item +the name of a single channel (e.g. @samp{FL}, @samp{FR}, @samp{FC}, @samp{LFE}, etc.) + +@item +a number of channels, in decimal, optionally followed by 'c', yielding +the default channel layout for that number of channels (see the +function @code{av_get_default_channel_layout}) + +@item +a channel layout mask, in hexadecimal starting with "0x" (see the +@code{AV_CH_*} macros in @file{libavutil/channel_layout.h}. +@end itemize + +Starting from libavutil version 53 the trailing character "c" to +specify a number of channels will be required, while a channel layout +mask could also be specified as a decimal number (if and only if not +followed by "c"). + +See also the function @code{av_get_channel_layout} defined in +@file{libavutil/channel_layout.h}. @c man end SYNTAX @chapter Expression Evaluation