[FFmpeg-user] aresample out_channel_layout values

Paul B Mahol onemda at gmail.com
Thu Oct 3 19:11:16 CEST 2013


On 10/3/13, Christian Ebert <blacktrash at gmx.net> wrote:
> * Stefano Sabatini on Thursday, October 03, 2013 at 09:14:33 +0200
>> On date Wednesday 2013-10-02 22:32:58 +0100, Christian Ebert wrote:
>>> * Christian Ebert on Tuesday, October 01, 2013 at 16:22:21 +0100
>>>> What are the correct values to pass to in/out_channel_layout as
>>>> aresample option?
>>>
>>> Attempt to answer my own question:
>>>
>>> 1c or 2c (from libavutil/channel_layout.h) do not throw an error
>>> but do not seem to have any effect.
>>>
>>> Plain integers 1 or 2 seem to work, but what's the difference
>>> then to specifying out_channel_count=1 ?
>>>
>>>> Finally: What would be the difference between:
>>>>
>>>> aformat=channel_layouts=stereo
>>>> and
>>>> aresample=out_channel_layout=<stereo?>
>>>
>>> Still curious about this one.
>>
>> They use different parsers. aresample accepts an integer, while
>> aformat understand the more human-friendly symbolic notation.
>
> ok, but how would you denote e.g. aformat=channel_layouts=downmix
> in an integer? 2? But that's already stereo.
>
> In what way does this integer differ from channel count?
>
>> We should probably extend the option system to accept channel
>> layout string specifications.
>
> Or document a mapping of those integers to their layout meanings,
> yes, that would be helpful.
>
> At the moment I'm not 100% sure whether out_channel_layout=2 has
> the same effect as out_channel_count=2 by coincidence.

count is for number of channels,

layout is for actual layout, in your case 2 maps to stereo, for actual
mapping see:

channel_layout_map in libavutil/channel_layout.c

So no, you can not use integer to denote 'downmix'.

>
> --
> \black\trash movie    _MORALISK  ANSTALT_
>                         "Nix verstanden."
>
> --->> http://www.blacktrash.org/underdogma/moraliskanstalt.php
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list