Skip to content

How do I remove a ten-millisecond audio pre-roll without moving the anchor from the video?

At 48 kHz, ten milliseconds equals 480 samples per channel. Remove those samples on an audio copy and reset its presentation start. Match the resulting sound to the intended picture anchor.

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 worked example retains samples 480 through 48479, a one-second excerpt. In the real edit, mark the original clap position before trimming and note whether the picture itself also lost a leader.

shell
ffmpeg -f lavfi -i "sine=frequency=440:sample_rate=48000:duration=3" -filter_complex "[0:a:0]atrim=start_sample=480:end_sample=48480,asetpts=PTS-STARTPTS[proof]" -map "[proof]" -c:a pcm_s16le audio-proof.wav

Read the result

Check a transient at the head and another toward the tail. Removing a constant pre-roll shifts both by the same amount. It cannot correct steadily growing drift.

With a synthetic three-second 440 Hz tone at 48 kHz, the local FFmpeg run decoded 48 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

If the recorded rate differs from 48 kHz, recalculate from that file's actual rate. A sample count carried across rates changes the time removed.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example