[FFmpeg-user] Using amerge to convert dual mono to stereo

Nicolas George nicolas.george at normalesup.org
Thu Jan 12 19:01:59 CET 2012

Le tridi 23 nivôse, an CCXX, Tim Nicholson a écrit :
> I am trying to use the amerge filter to convert dual mono to stereo,
> but get a warning from amerge:-
> "[amerge @ 0x1933a80] Inputs overlap: output layout will be meaningless"
> and sure enough what I get is stream 1 on both channels of the
> stereo output with no stream 2 at all....

It is not a matter of having twice stream #1. It is a matter of having twice
a front center stream. Internally, most places in ffmpeg where audio
channels are handled, there is an additional field to mark what channel they
are. A stream with one channel marked "front center" is not the same thing
as a stream with one channel marked "back left".

There is a hardcoded order for the channels: first front left, then front
right, etc.

amerge takes that into account whenever possible: if you merge two streams
with several channels, it reorders them as necessary. For example if your
first stream has front and back left, and the second has front and back
right, then the back left from the first stream will come after the front
right from the first.

Unfortunately, if there is a channel that appears on both streams, it can
not work, as amerge does not mix (and we would not want it to). Instead, it
disregards completely the layout, assuming it is wrong.

If you get that warning, you have to examine carefully the output to see if
the channels are in the right order.

Another possibility would be to use aformat, or maybe pan, to correctly flag
the layout for each stream before feeding them to amerge.

> [amerge @ 0x1933a80] Inputs overlap: output layout will be meaningless

> [amerge @ 0x1933a80] in1:mono + in2:mono -> out:stereo

In this particular trivial case, the first input is mapped to the left and
the second output is mapped to the right. Maybe (probably) it is what you
want; maybe not (first input is front center, second input is subwoofer).


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120112/6669fc0a/attachment.asc>

More information about the ffmpeg-user mailing list