Every race video gets background music generated by MusicGen medium on my own 5070 Ti, then mixed under the commentary with ffmpeg. Paying for a track per video does not scale past a hundred videos.

the music on its own
Straight out of MusicGen, before any mixing.

MusicGen caps a piece at about 41 seconds

One MusicGen piece covers a whole race, which is about 32 seconds plus a closing line.

  • MusicGen makes about 50 tokens per second of audio and holds 2048 tokens at once, hence the cap.
  • Asking for 45 seconds crashes CUDA.
  • 40 seconds of music takes about 133 seconds to generate, once per video.

The first mix stacked to -35.5 dB and could not be heard

ffmpeg's volume turns a track down from its current level, so -17dB on music already at -18.5 dB gave -35.5 dB.

  • The fix measures first: volumedetect reports the real level, so --bgm-db -20 now means the music ends up at -20 dB.
  • volumedetect prints its answer at a log level I had silenced.
  • Writing the throwaway output to - fails on Windows while looking like it worked.
  • Both bugs gave a believable number that was never measured, which is harder to spot than a crash.
commentary on its own
the finished mix
The same commentary with music underneath. It is still there through every line.

The commentary ducks the music through ffmpeg's sidechaincompress

The music drops whenever a line is spoken and comes back up in the gaps, the way radio and TV do it.

  • Music at a fixed volume either drowns the commentary or disappears under it.
  • Ratio 4: a ratio of 12 flattened the music to nothing.
  • Release 250 ms: 600 ms never let the music recover between lines a second apart.
  • The music fades out and stops before the video does, leaving the closing line in silence.

Five videos share one track

Attack on Titan, Hunter x Hunter, Tempest, Tokyo Revengers and Iruma use the same music file, byte for byte.

  • The prompt is the only creative control, and only Frieren has music of its own.
  • One track was made early and reused. Nobody noticed, because the ducking works whatever the track is.