[FFmpeg-cvslog] doc: document amerge filter as an alternative for the -map_channel limitation.
Clément Bœsch
git at videolan.org
Thu Feb 2 14:41:13 CET 2012
ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Jan 10 11:47:46 2012 +0100| [d055c3286c979095650453f08a4d69fb6d995f92] | committer: Clément Bœsch
doc: document amerge filter as an alternative for the -map_channel limitation.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d055c3286c979095650453f08a4d69fb6d995f92
---
doc/ffmpeg.texi | 12 ++++++++++++
doc/filters.texi | 17 +++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index e3a4c75..943301a 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -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):
+
+ 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
+
@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.
diff --git a/doc/filters.texi b/doc/filters.texi
index c6bcf0b..1f3522e 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -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:
+ at 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
+ at end example
+
@section anull
Pass the audio source unchanged to the output.
More information about the ffmpeg-cvslog
mailing list