Mix behavior contract
This is a command-line mix-behavior diagnosis, separate from the creative question of how loud music should sit beneath dialogue. A filter's default policy can alter level even when neither source has a visible volume automation curve. The useful artifact is a mix contract that another editor can reproduce: which input controls duration, how much each contributes, whether the mixer normalizes, and what happens when one input stops. AISwapLab does not expose these audio-mixer controls as generation settings.
Build the evidence
- 01
Freeze the two inputs and their intended roles
Confirm file identity, channel layouts, sample rates and time origins for dialogue and music. Check for existing silence, limiting or clipping before blaming the mix stage. Specify the intended complete program duration and whether music should continue after the dialogue. If only a short passage is being compared, use the identical passage in every trial so a different content section does not masquerade as a level change.
- 02
Compare explicit mixing policies
The example uses input zero as the duration authority, gives the second input a quarter weight, and disables amix normalization. It therefore adds the weighted sample contributions and can clip if the inputs are too strong. Those settings are a transparent diagnostic choice, not an approved artistic balance or safe universal recipe. For a normalized alternative, set normalize=1 explicitly and record its ending transition policy before comparing.
- 03
Measure and listen to the actual output
Scan the rendered WAV for loudness and peaks, then audition speech intelligibility, music balance and the interval where either input ends. Compare both loudness-matched and original-level listening when trying to identify processing artifacts; otherwise the louder trial may sound deceptively better. Keep the chosen filter string and endpoint policy with the mix. Encode a separate delivery copy only after approval and verify that encoded asset too.
A bounded example
Local executed fixture: two synthetic mono tone stems were mixed using the listed weights, first-input duration and normalization disabled under FFmpeg 7.1. The command completed successfully. Their modest amplitude made this a routing-and-settings test, not proof that disabling normalization is safe for full-scale dialogue and music. A real duet needs level measurement and listening; the fixture contains no licensed song or spoken performance. Check the delivered channel count as well as the mix level.
Local diagnostic commands
The weighted amix command was executed on local synthetic mono tone stems using FFmpeg 7.1. No dialogue/music balance, music license or paid generation was tested.
ffmpeg -n -i dialogue.wav -i music.wav -filter_complex "[0:a][1:a]amix=inputs=2:duration=first:weights=1 0.25:normalize=0[mix]" -map "[mix]" -c:a pcm_s24le mix.wav
ffmpeg -i mix.wav -af "ebur128=peak=true" -f null -Mix behavior contract
| Control | Example | Question to verify |
|---|---|---|
| Duration | first | Should the first input end the program? |
| Weights | 1 and 0.25 | Approved artistic contribution? |
| Normalize | Disabled | Enough headroom for sample summation? |
| Ending behavior | Separate audition | Unexpected level movement or missing tail? |
Acceptance evidence
- Normalization and endpoint policies are written rather than left implicit.
- The output is measured for clipping after the chosen weighted sum.
- The shorter input's ending receives an explicit audition.
- Creative balance approval is separate from a technically valid mix command.
Stop condition
Stop if the source is already clipped, the approved balance cannot fit the peak constraint or dialogue becomes masked. Revise gain staging or the mix rather than treating normalize=0 as a quality upgrade. A mixer can combine available recordings; it cannot establish rights to a song or restore missing words.
