For an FFmpeg amix mix, make three separate choices: set each input’s relative weights, choose duration to follow the first, shortest, or longest input, then decide how to handle the level change when an input ends. dropout_transition controls the time for volume renormalization at that point; normalize controls whether inputs are scaled or simply summed. Weights do not guarantee a particular output loudness, so listen around the exit and inspect peaks, especially if normalization is disabled.
Choose the mix behavior
- Set the relative balance. Start with the source that should lead at weight
1, then choose a smaller weight for a supporting source. For example,1 0.25assigns the music a quarter of the vocals’ weight in the filter’s relative weighting, not a promise that it will sound one quarter as loud. The result also depends on the incoming signals. The official `amix` reference says each input defaults to weight1; if the list is shorter than the input count, the last listed weight applies to the remaining inputs. - Choose the output’s end independently. Use
duration=firstwhen the first input defines the intended cut,shortestwhen the mix should stop with the first input to finish, orlongestwhen it should continue until the last input ends.longestis the documented default. These choices determine the mix’s end-of-stream rule, not how much of a source is audible before then. - Decide what should happen as a stream exits.
dropout_transitionsets, in seconds, the time for volume renormalization when an input stream ends; the documented default is 2 seconds. It does not fade the source itself. Compare transition values with normalization enabled. Whennormalize=0, inputs are summed without scaling, so do not treatdropout_transitionas a source-fade control or assume it changes the unnormalized sum. Listen across the ending to assess the rendered result. - Choose whether to normalize. With normalization enabled,
amixscales inputs rather than only summing samples; it is enabled by default. Withnormalize=0, samples are summed without that scaling, and the documentation warns of heavy clipping if inputs are not normalized before or after the filter. Do not treat either the weights or this switch as a target loudness setting.
For a hypothetical 30-second narration and 42-second music track, duration=first ends the output with the narration, while duration=longest allows the output to continue to the music’s end. If the narration is listed first, duration=first follows that 30-second input. The two duration choices answer different editing intentions; neither alone decides the desired musical tail.
Acceptance worksheet
Use this hypothetical worksheet to compare decisions. The observations below are review questions, not guaranteed FFmpeg results. Keep the same inputs and weights for each comparison so the changed setting is identifiable.
| Pass | Settings to compare | Observation to record | Decision |
|---|---|---|---|
| A | weights="1 0.25", duration=first | Does the 30-second output end with the narration, and is the last word intact? | Choose if narration defines the cut; otherwise compare B. |
| B | Same weights, duration=longest | Does the output continue after the hypothetical 30-second narration toward the 42-second music ending? | Choose if the remaining music is intended; decide separately whether its tail belongs in the edit. |
| C | With normalization enabled, keep the sources and chosen duration fixed; compare dropout_transition=0 with 2 | Listen immediately before and after narration ends; note any level change that distracts from the music. | Select the transition that suits the intended handoff; the default is 2 seconds. This is an editorial comparison, not an official test result. |
| D | Compare default normalization with normalize=0 | Inspect the peak and listen for distortion, particularly around the narration exit. | Keep unnormalized summing only if the rendered mix remains acceptable; a weight setting is not peak protection. |
Limits and next steps
If the end is wrong, first confirm the input order and intended end rule, then compare the applicable duration choices. If the music feels too prominent, adjust relative weights and repeat the listening check; do not infer a fixed loudness ratio from the numbers. If a level shift at the exit is undesirable, compare transition settings around that boundary. If disabling normalization produces clipping, re-enable it or adjust the mix and inspect the result again. These are editorial checks, not a guarantee that a parameter change will repair a source recording.
The documentation defines the filter controls but does not promise a specific perceived balance, peak level, or artistic result for a given pair of files. It also does not say that a chosen transition will create a particular fade shape. Make the final decision from the rendered audio and the intended ending, rather than from parameter values alone.
Does `weights="1 0.25"` mean the music will sound one quarter as loud?
No. It specifies relative input weights, not perceived loudness or a guaranteed output level.
Which duration should I use if the music is longer?
Use first if the first input should set the end, shortest if the earliest-ending input should set it, or longest if the mix should run through the latest-ending input.
What does `dropout_transition=0` mean?
It sets the volume-renormalization transition time to zero seconds when an input ends. It does not set a source fade. Assess it at the input boundary with normalization enabled; with normalize=0, do not use it as a fade control.
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.