# Synthetic music-ducking comparison

This local renderer demonstration accompanies https://valmera.io/tools/add-music-to-video.
It is not a Studio agent request, account export or music-generation feature.

The source MP4 contains the first 12 seconds of Valmera's previously published
motion-graphic sample. Its silent audio was replaced with an 880 Hz test tone
at 2–4 and 6–8 seconds, with short ramps to avoid abrupt edges. The separate
music-bed.wav contains a steady synthesized chord: 220, 330 and 440 Hz.
There is no human voice, customer footage or third-party song in this example.

The two edit specifications differ only in music ducking enablement and mode.
Music gain is 0 dB, with a 0.2-second fade-in and 0.5-second fade-out. Mastering,
voiceover, looping and other audio processing were not requested. These are
comparison settings, not a recommended mix for every recording.

The filtergraph files were generated by the Valmera renderer at backend revision
b6f8ed84ed2057c979bcc47207ac5a1d74fb8c81. The output uses FFmpeg 7.1, AAC 192 kbit/s.
Both graphs render the source picture as well as audio; the page exposes the
extracted audio for comparison. Read evidence.json for hashes and measurements.

To reproduce a variant, place its filtergraph beside source-with-tones.mp4 and
music-bed.wav. With FFmpeg 7.1, for example:

```sh
ffmpeg -i source-with-tones.mp4 -i music-bed.wav \
  -filter_complex_script with-ducking.filtergraph.txt \
  -map '[vout]' -map '[aout]' -t 12 \
  -c:v libx264 -preset veryfast -crf 20 -pix_fmt yuv420p \
  -c:a aac -b:a 192k reproduced-with-ducking.mp4
ffmpeg -i reproduced-with-ducking.mp4 -map 0:a:0 -c:a copy \
  -movflags +faststart reproduced-with-ducking.m4a
```

For the other variant, use without-ducking.filtergraph.txt and distinct output
names. Encoder/platform differences can change output bytes. The supplied
measurements compare decoded signals, not a subjective quality score or LUFS.

Play one comparison at a time using the same device volume. The background chord
is reduced while the higher test tone plays with smooth ducking enabled. This
shows that the compressor responds to the program sound level; it does not
establish speech recognition or performance on real dialogue.
