Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e0545262
Commit
e0545262
authored
Jun 03, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amerge: accept multiple inputs.
parent
e8e492b3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
68 deletions
+127
-68
filters.texi
doc/filters.texi
+12
-10
af_amerge.c
libavfilter/af_amerge.c
+115
-58
No files found.
doc/filters.texi
View file @
e0545262
...
...
@@ -168,9 +168,16 @@ aformat=sample_fmts\=u8\,s16:channel_layouts\=stereo
@section amerge
Merge two audio streams into a single multi-channel stream.
Merge two
or more
audio streams into a single multi-channel stream.
This filter does not need any argument.
The filter accepts the following named options:
@table @option
@item inputs
Set the number of inputs. Default is 2.
@end table
If the channel layouts of the inputs are disjoint, and therefore compatible,
the channel layout of the output will be set accordingly and the channels
...
...
@@ -189,7 +196,7 @@ On the other hand, if both input are in stereo, the output channels will be
in the default order: a1, a2, b1, b2, and the channel layout will be
arbitrarily set to 4.0, which may or may not be the expected value.
Both
inputs must have the same sample rate, and format.
All
inputs must have the same sample rate, and format.
If inputs do not have the same duration, the output will stop with the
shortest.
...
...
@@ -199,8 +206,7 @@ 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: multiple merges:
@example
ffmpeg -f lavfi -i "
amovie=input.mkv:si=0 [a0];
...
...
@@ -209,11 +215,7 @@ 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
[a0][a1][a2][a3][a4][a5] amerge=inputs=6" -c:a pcm_s16le output.mkv
@end example
@section amix
...
...
libavfilter/af_amerge.c
View file @
e0545262
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment