Before combining audio inputs with FFmpeg’s amerge, confirm that every input has the same sample rate and sample format, decide how you want the channels ordered, and compare durations. amerge places channels into one multichannel stream; it does not add their sound together. If input durations differ, the output stops with the shortest input, so do not rely on the merge to fill a longer one.
Check compatibility and choose the channel order
Make a short record for each input: sample rate, sample format, channel count, named channel layout, and duration. Use a media probe or editor that exposes these fields. A channel count alone is insufficient to establish what each channel represents. If sample rates or sample formats differ, stop and prepare compatible inputs before merging; the official amerge documentation requires those properties to match.
Next, write down the desired output order by channel name or by input sequence. This matters when inputs are multichannel, layouts overlap, or a downstream editor expects a specific surround assignment. The filter’s layout modes govern whether channel labels are retained and whether reordering occurs; they do not make different sounds into a mix. See the official `amerge` options before selecting a mode.
For example, with two stereo inputs, reset and normal both keep the first input’s two channels followed by the second input’s two channels. reset ignores input layouts and describes the output only by its total channel count. normal keeps channel names and designation information, without reordering. The default legacy mode behaves differently: where known layouts are disjoint and compatible, it may reorder channels to form the output layout. When layouts overlap or are unknown, the result instead follows input order and uses a default layout for the total channel count. Do not assume a four-channel result will be labeled as two stereo pairs.
Use a preflight worksheet
The following figures are a hypothetical planning example, not measured media or a guarantee of a particular file’s output. The intended use is to deliver a four-channel file whose first pair is the recorder feed and whose second pair is a reference mix.
| Check | Hypothetical observation | Decision before merge |
|---|---|---|
| Input A | 48 kHz, pcm_s24le, stereo, 60 seconds | Record left and right as A1 and A2 |
| Input B | 48 kHz, pcm_s24le, stereo, 57 seconds | Record left and right as B1 and B2 |
| Layout modes | Both inputs are stereo | Expect A1, A2, B1, B2 with reset or normal; verify labels and downstream interpretation separately |
| Duration | B is 3 seconds shorter | If using amerge unchanged, plan for output to end at 57 seconds, not 60 |
| Acceptance | Intended delivery needs 60 seconds | The unchanged merge does not meet the duration requirement; resolve the missing interval before export |
Follow this order: inspect all four fields and durations; define the required channel sequence; choose a layout mode consistent with that sequence; then review the resulting channel labels, audio, and endpoint in a short acceptance render. The worksheet’s channel names are bookkeeping for this example, not labels guaranteed by FFmpeg.
If a check fails
If sample rates or formats do not match, prepare inputs with matching values and inspect the prepared files before retrying. If the duration mismatch is intentional but the output must continue longer, decide how to handle the shorter input’s missing tail before merging. That might mean editing or extending an input in a separate workflow, or choosing another processing approach. amerge itself is documented to stop with the shortest input; the documentation does not say it automatically inserts silence or repeats audio.
If the channel order or names do not match the delivery specification, do not accept the file based only on its channel count or successful playback. Compare each output channel to its recorded source identity and check that the receiving application interprets the layout as intended. The official filter documentation’s examples and layout-mode definitions distinguish ordered channel handling from channel naming and layout determination. This guide covers preparation and acceptance of an external FFmpeg workflow; it does not describe an Imagild control or guarantee a particular export result.
Quick questions
Does `amerge` make a normal mix? No. It combines input channels into one multichannel stream; it does not sum their audio content. Use a mixing workflow when the goal is to blend sounds into fewer channels.
Which mode should I use for two stereo inputs? Choose based on the required channel labels and downstream interpretation. Both `reset` and `normal` retain input order for this case, but differ in the layout information they preserve. Verify the output rather than relying on its channel count.
Can I keep the full duration when one input is shorter? Not by assuming `amerge` will pad it. The documented behavior is to stop at the shortest input. Resolve the duration mismatch beforehand or use a workflow that explicitly handles the shorter input’s tail.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the film workspace. The external software controls discussed above belong to their respective products.