[FFmpeg-devel] Stereo channel layout mapping

Michael Niedermayer michaelni at gmx.at
Fri Aug 8 02:31:23 CEST 2014


On Thu, Aug 07, 2014 at 04:52:43PM +0200, Robert Krüger wrote:
> Hi,
> 
> could someone explain, what the difference between those two is and
> when to use which one?
> 
> #define AV_CH_LAYOUT_STEREO            (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
> #define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)

if you have a file with 2 channels these would likely be AV_CH_LAYOUT_STEREO

if you have a file with 5.1 that in addition have 2 channels for
stereo playback equipment then that would have 8 channels and use
AV_CH_LAYOUT_STEREO_DOWNMIX + whatever else for 5.1


> 
> E.g. when I extract metadata and want to use that as a basis to
> display the channel info to a user in a UI it is a bit surprising to
> display "Front left" and "Front right" for the channels of a plain
> stereo file. I can handle that case manually but it would be nice to
> understand the rationale behind it.
> 
> Regards,
> 
> Robert
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140808/fe9475ca/attachment.asc>


More information about the ffmpeg-devel mailing list