[FFmpeg-user] aresample out_channel_layout values

Stefano Sabatini stefasab at gmail.com
Thu Oct 3 09:14:33 CEST 2013


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?
> > 
> > The aformat filter accepts aformat=channel_layouts=mono, but
> > aresample=22050:out_channel_layout=mono gives the following error:
> > 
> > [SWR @ 0x7fe9bb000600] [Eval @ 0x7fff570741d0] Undefined constant or missing '(' in 'mono'
> > [SWR @ 0x7fe9bb000600] Unable to parse option value "mono"
> > [AVFilterGraph @ 0x7fe9b9c16140] Error initializing filter 'aresample' with args '22050:ocl=mono'
> > Error configuring filters.
> > 
> > I also tried out_channel_layout=FC (taken from ffmpeg -layouts)
> > with the same error.
> 
> 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. We
should probably extend the option system to accept channel layout
string specifications.


More information about the ffmpeg-user mailing list