PRODUCT CREATIVE / PRODUCTION AND HANDOFF
Why does an FFmpeg mix end early or continue after my product-ad voiceover finishes?
Check amix’s duration policy and the order of its inputs. The output can follow the longest input, shortest input, or first input. A music bed continuing after narration can be consistent with the longest policy; first does not mean whichever source an editor informally considers the main track.
Choose which ending the brief requires
A spoken explanation and a music bed often have different durations. Sometimes the closing picture should retain music after the final word; sometimes the whole mix should stop at a fixed narration ending. State that requirement before changing the filter. A longer file is not automatically a fault, and a shorter file is not automatically a cleaner export.
FFmpeg documents longest, shortest and first as separate end-of-stream choices. First refers to the first input supplied to the filter. Track names, filenames and the order an editor mentally associates with a product demonstration do not establish that routing. Record the actual filter input order alongside the selected policy.
Separate the ending from level transitions
The duration policy decides when the mixed output ends. The dropout_transition parameter describes the time used for volume renormalization when an input ends. Adjusting that level transition is a different decision from selecting which input establishes the endpoint.
Weights and normalize are also level controls. Changing them to hide an unwanted ending does not document the intended end policy. The documentation warns about clipping risk when normalization is disabled; this duration experiment did not test that risk or establish an appropriate narration-to-music balance. Keep those conclusions separate.
Executed synthetic comparison
We generated a three-second tone A and a five-second tone B at 48000 Hz, then mixed them using FFmpeg 7.1 with PCM WAV output. WAV frame counts gave five seconds for longest, three for shortest, and three for first when A was first. Reversing the input order made first produce five seconds. These are measured results for generated tones, not a listening test of a real advertisement.
The comparison isolates the end policy and input order. It does not prove the resulting files have acceptable musical endings, readable offer conditions or the correct final-picture timing. Those require review of the actual delivery. Other processing stages can introduce additional timing behavior beyond this small fixture.
| Filter setting | Input order | Measured seconds | Sample rate | Channels |
|---|---|---|---|---|
| amix=inputs=2:duration=longest | 0→1 | 5 | 48000 | 1 |
| amix=inputs=2:duration=shortest | 0→1 | 3 | 48000 | 1 |
| amix=inputs=2:duration=first | 0→1 | 3 | 48000 | 1 |
| amix=inputs=2:duration=first | 1→0 | 5 | 48000 | 1 |
Apply the decision to the real edit
Illustrative exercise: one ad should retain an approved musical ending after speech, while another must end with a narration file designated as the timing reference. For the first, compare the intended longest contribution with the picture. For the second, establish the actual first input before relying on first. Neither decision follows simply from calling a file voiceover.
Measure the rendered output and listen through every final word and the closing transition. Stop if the selected policy cuts required content or leaves an unintended tail. Keep the originals and revise the routing or source edit on a copy. Approve the combined picture and soundtrack rather than treating the synthetic duration table as a universal publishing specification.
Inspect the actual measurement data
These data describe the synthetic checks scoped in the article, not real-product, publishing-platform or subjective-quality acceptance.
- synthetic-audio-measurements.csv · SHA256 adb245b135d92d5519b44f0039de5d51eeba4a01e9f5a3775d5da74581d58cf4
Illustrative ad-mix endpoint decision record
These are illustrative exercise rows. Save a copy and record your own observations; the example is not an executed acceptance test.
| Brief | Actual first input | Required endpoint | Chosen policy to verify | Final review |
|---|---|---|---|---|
| Keep musical closing | Record actual route | Approved music ending | Compare longest with the full edit | Listen through the tail against picture |
| Follow narration endpoint | Narration must be verified as first | Approved narration length | Compare first after checking order | Check no required word is cut |
Sources and further reading
Recorded source-review dates are listed individually below. An undated source does not inherit the article’s publication date. Software and platform rules can change; check the current original before acting.
- FFmpeg Filters: amix · Reviewed
Frequently asked questions
Does first mean the voiceover automatically?
No. It follows the first filter input. Record the actual input order before choosing that policy.
Can dropout_transition set my advertisement’s total length?
It concerns volume renormalization when an input ends. Choose and verify the end-of-stream policy separately.
PREPARE ASSETS FOR YOUR NEXT STEP
Create supporting product assets in Itemlume.
Create new product creative assets in the workspace, then continue in your chosen tools. Third-party software procedures described in this guide take place in those applications; this workspace link does not imply an integration. Check current capabilities, account access and credit quotes.
Explore asset creation tools Check pricing and credits