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

Tim Nicholson nichot20 at yahoo.com
Tue Jan 24 08:58:00 CET 2012


On 23/01/12 22:43, Clément Bœsch wrote:
> On Mon, Jan 23, 2012 at 03:13:29PM +0100, Nicolas George wrote:
>> L'octidi 28 nivôse, an CCXX, Tim Nicholson a écrit :
>>> 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.
>>
>> I have a mixed feeling about that: the aformat/s16 problem is not related to
>> amerge, if we start adding it there, we should add it pretty anywhere, and
>> it will make all examples muddy.
>>

If this were an example of the use of amerge in the amerge section I would
agree. However it is meant to show a workaround for the current channel mapping
limitation, and as such I believe should show all filters necessary to achieve
that, including the aformat.

>> A dedicated section on troubleshooting would, IMHO, more appropriate.
>>

A dedicated section on troubleshooting generally would be a good idea, and the
recent patch to show the filtergraph is a good help in this.

> 
> Sorry I almost forgot this patch. It seems there is still something to fix
> with the current patch; do you expect me to change something concerning
> the last version I sent or should I just push it?

I am unhappy without the addition of the aformat part as without it the
workaround may fail, and Nicolas is concerned that adding it muddies the example.

As he admits though, aformat is pretty much needed in all cases, and since this
is a workaround it doesn't make sense to me for it not to contain the complete
filtergraph necessary for that workaround.

If you would prefer I can always stick a full example on the trac filtering
guide page.

-- 
Tim


More information about the ffmpeg-devel mailing list