1. The Perils of Generational Loss in Audio
When a video is recorded on a smartphone or mirrorless camera, the audio track is typically compressed using a lossy codec—most often AAC-LC (Advanced Audio Coding - Low Complexity) or Opus at 128 kbps to 256 kbps.
Lossy psychoacoustic algorithms discard frequency information deemed imperceptible to human ears. However, if a web video tool decodes this lossy stream into raw PCM audio and subsequently compresses it a second time into AAC:
- Artifact accumulation: Quantization noise from both compression cycles compounds, creating a harsh "metallic" or "underwater" sound in high-frequency ranges.
- Stereo phase distortion: Spatial soundstage imaging collapses.
- Truncated frequency cutoff: Aggressive re-encoders introduce steep low-pass filters cutting off frequencies above 15 kHz.
2. Demuxing vs. Transcoding: How Container Remuxing Works
A video file (such as an .mp4 or .mov) is not a single format; it is a multimedia container that multiplexes multiple independent data streams:
During stream copying (passthrough), FFmpeg decouples the video and audio streams at the container boundary:
- The video elementary stream is decoded, passed through spatial inpainting filters (like
delogo), and re-encoded. - The audio elementary bitstream packets are extracted without touching their inner compressed data.
- The new video packets and untouched audio packets are remultiplexed into the output container with perfect millisecond timestamp alignment.
3. Preventing Audio/Video Sync Drift (PTS & DTS Timestamps)
A common bug in rudimentary converters is audio sync drift: the audio gradually slips 50–200ms out of sync over a 5-minute video.
This occurs when the encoder fails to preserve Presentation Time Stamps (PTS) and Decoding Time Stamps (DTS). To ensure sample-accurate synchronization across all players, use the following production command:
The -avoid_negative_ts make_zero flag normalizes initial packet timestamps, guaranteeing that video frame 0 and audio sample 0 commence simultaneously.
4. Inspecting Audio Streams with FFprobe
To verify that your audio stream was preserved bit-for-bit without alteration, run ffprobe to verify codec parameters:
Our Architecture at VideoWatermarkRemover.tech
In our Online Video Studio, we built our server pipeline specifically around zero-touch audio remuxing. Whether your file contains 5.1 Dolby Surround, 48 kHz stereo AAC, or studio-grade uncompressed PCM, your audio track is never re-compressed.