[FFmpeg-devel] [PATCH] doc: document amerge filter as an alternative for the -map_channel limitation.

Tim Nicholson nichot20 at yahoo.com
Mon Jan 16 09:39:58 CET 2012

Nicolas George <nicolas.george at normalesup.org> wrote:-

> Le quartidi 24 nivôse, an CCXX, Tim Nicholson a écrit :
>>  Did not work for me because as my source was pcm_s24le the following took 
> place:-
>>  [amerge @ 0x17f9a60] in1:mono + in2:mono -> out:stereo
>>  [aconvert @ 0x17ef2e0] fmt:s32 cl:stereo planar:0 -> fmt:s16 cl:mono 
> planar:0
>>  i.e. the automatically inserted aconvert turned the stereo back into mono.
> This is not related to amerge, you can get the same result with:
> ./ffmpeg_g -f lavfi -i 'amovie=t24.flac' -f wav - > /dev/null
> (where t24.flac is a s24 FLAC file):
> [abuffersink @ 0x2c4f340] auto-inserting filter 'auto-inserted aconvert 
> 0' between the filter 'Parsed_amovie_0' and the filter 'out'
> [aconvert @ 0x2ce81a0] fmt:s32 cl:stereo planar:0 -> fmt:s16 cl:mono planar:0
> The problem is the combination of two misfeatures:
> - The lavfi device only supports S16LE in the output audio pads, this is
>   hardcoded in the source.
> - The aconvert filter does not make any effort to avoid conversions when it
>   can, and thus will probably always downmix to mono if the next filter
>   accepts it.
> The limitation of lavfi is quite easy to remove.
> The problem of aconvert is more difficult. In the meantime, it can be worked
> around using the aformat filter.

For the purposes of providing a workaround such as Clément proposes
I believe it should include whatever is necessary to overcome the above
lavfi/avconvert limitations as universally as possible. It looks like using 
aformat may do this better than aconvert.

I will try using aformat instead of aconvert now I understand the situation better.

> Regards,
> -- 
>   Nicolas George


More information about the ffmpeg-devel mailing list