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

Tim Nicholson nichot20 at yahoo.com
Tue Jan 17 08:45:08 CET 2012


On 16/01/12 08:39, Tim Nicholson wrote:
> Nicolas George <nicolas.george at normalesup.org> wrote:-

>> [...]

>> - 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.
> 

OK so after further testing I propose this amendment to Clément's patch:-

was:-
+ at example
+ffmpeg -i input.mkv -f lavfi -i "
+amovie=input.mkv:si=1 [a1];
+amovie=input.mkv:si=2 [a2];
+[a1][a2] amerge" -c:a pcm_s16le -c:v copy output.mkv
+ at end example
+

becomes:-
+ at example
+ffmpeg -i input.mkv -f lavfi -i "
+amovie=input.mkv:si=1 [a1];
+amovie=input.mkv:si=2 [a2];
+[a1][a2] amerge, aformat=s16:stereo:all" -c:a pcm_s16le -c:v copy output.mkv
+ at end example
+

Thus forcing the stereo format in cases where the source bit depth may not be 16.

-- 
Tim


More information about the ffmpeg-devel mailing list