Skip to content

How can I reproduce gradual audio drift in a face-swap timeline to explain the difference from a fixed delay?

Change the interpreted sample rate on a controlled copy and resample back to the delivery rate. This alters playback duration slightly and creates a growing timing difference rather than a fixed lead-in.

PREPARE AND CHECK THE SOUNDTRACKAISwapLab team · Editorial methodPublished 2 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file

Set up the edit

The example interprets 48,000 samples per second as 47,952 before returning to a 48 kHz stream. Place identical time marks near the beginning and end of a longer test to make accumulation visible.

shell
ffmpeg -f lavfi -i "sine=frequency=440:sample_rate=48000:duration=3" -filter_complex "[0:a:0]asetrate=47952,aresample=48000[proof]" -map "[proof]" -c:a pcm_s16le audio-proof.wav

Read the result

By the end of a long clip the mismatch can be clear even though the opening aligns. Compare multiple landmarks before changing the actual audio rate.

With a synthetic three-second 440 Hz tone at 48 kHz, the local FFmpeg run decoded 142 audio blocks. The tone makes timing and routing repeatable. Listening to the actual dialogue or music is still part of the final check.

If the first pass falls short

This intentionally introduces drift. Verify the source and project timebases first. A spatially different replacement gesture may never coincide exactly with the original sound.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example