Audio Processing
10 articles
Add Background Music with FFmpeg ? amix BGM Guide
How to add BGM to a video with FFmpeg. Covers amix mixing, volume balance, length adjustment (apad/aloop), fade in/out, and auto-ducking with copy-paste commands and primary sources.
Audio Fade-In and Fade-Out with the afade Filter
Create smooth audio fades in FFmpeg with the afade filter. Covers start time, duration, curve types, applying fades to video audio tracks, and combining fade-in with fade-out in one command.
Automatically Duck BGM Under Narration with sidechaincompress
Implement audio ducking in FFmpeg with the sidechaincompress filter. Automatically lower background music whenever narration plays, with tunable threshold, ratio, attack, and release.
Fix Audio Delay Manually with adelay and -itsoffset
Fix audio/video sync by applying a manual offset in FFmpeg. Add audio delay with the adelay filter, shift video or audio timestamps with -itsoffset, and measure the delay with ffprobe.
FFmpeg Noise Gate ? Remove Background Noise with agate
Use FFmpeg's agate filter to apply a noise gate that removes background hum and tape hiss during silence. Covers threshold, attack, release, and range parameters, plus practical podcast and voice-over settings.
FFmpeg astats ? Measure RMS, Peak, and DC Offset
Learn how to measure audio statistics with FFmpeg's astats filter — RMS and peak levels, DC offset, dynamic range, per-channel measurements, log output, and how it compares to volumedetect.
Audio Format Conversion — WAV, MP3, AAC, and FLAC
Convert audio formats with FFmpeg: WAV, MP3, AAC, FLAC. Covers -c:a encoder, -b:a vs -q:a quality control, and -ar sample rate conversion.
FFmpeg Fix Audio Sync — -itsoffset, adelay, and -async Explained
Fix audio-video sync drift (lip sync issues) with FFmpeg: -itsoffset for lossless timestamp shift, adelay filter for millisecond-precise audio delay, -async for auto-correction, measuring drift with ffprobe, five error fixes, and five FAQ answers.
FFmpeg Extract Audio ? MP3, AAC, WAV, FLAC
Extract audio from video with FFmpeg: lossless copy (-c:a copy) vs re-encoding and when to use each, MP3/AAC/FLAC/WAV format-specific commands, multi-track selection with -map, time-range extraction, batch processing, and five common error fixes.
Loudness Normalization — EBU R128 with the loudnorm Filter
Normalize audio to EBU R128 standard with FFmpeg loudnorm filter. Single-pass and two-pass measurement modes. Key parameters: I (integrated LUFS), TP, and LRA.