]> git.sesse.net Git - ffmpeg/commitdiff
doc: document amerge filter as an alternative for the -map_channel limitation.
authorClément Bœsch <clement.boesch@smartjog.com>
Tue, 10 Jan 2012 10:47:46 +0000 (11:47 +0100)
committerClément Bœsch <ubitux@gmail.com>
Thu, 2 Feb 2012 13:31:17 +0000 (14:31 +0100)
doc/ffmpeg.texi
doc/filters.texi

index e3a4c755ba28bea08e91da92ec9610453fd6e499..943301a5673db2e343791b0635c0689bf57a87be 100644 (file)
@@ -835,6 +835,18 @@ possible, for example, to turn two separate mono streams into a single stereo
 stream. However spliting a stereo stream into two single channel mono streams
 is possible.
 
+If you need this feature, a possible workaround is to use the @emph{amerge}
+filter. For example, if you need to merge a media (here @file{input.mkv}) with 2
+mono audio streams into one single stereo channel audio stream (and keep the
+video stream):
+
+@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
+@end example
+
 @item -map_metadata[:@var{metadata_spec_out}] @var{infile}[:@var{metadata_spec_in}] (@emph{output,per-metadata})
 Set metadata information of the next output file from @var{infile}. Note that
 those are file indices (zero-based), not filenames.
index c6bcf0bdcd9d4105567c7b7745a284efc4aae344..1f3522e08d9fb9b9433e9c31a82b1a458d3a0f14 100644 (file)
@@ -189,6 +189,23 @@ Example: merge two mono files into a stereo stream:
 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
 @end example
 
+If you need to do multiple merges (for instance multiple mono audio streams in
+a single video media), you can do:
+@example
+ffmpeg -f lavfi -i "
+amovie=input.mkv:si=0 [a0];
+amovie=input.mkv:si=1 [a1];
+amovie=input.mkv:si=2 [a2];
+amovie=input.mkv:si=3 [a3];
+amovie=input.mkv:si=4 [a4];
+amovie=input.mkv:si=5 [a5];
+[a0][a1] amerge [x0];
+[x0][a2] amerge [x1];
+[x1][a3] amerge [x2];
+[x2][a4] amerge [x3];
+[x3][a5] amerge" -c:a pcm_s16le output.mkv
+@end example
+
 @section anull
 
 Pass the audio source unchanged to the output.