C.W.K.
Stream
Lesson 06 of 10 · published

Audio Extraction & Removal

~10 min · audio, extract, mute, podcast

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Common audio surgery

Three operations come up constantly: pull the audio out of a video as MP3/AAC, strip audio entirely (silent video), and replace audio with a different track.

Extract — to MP3, M4A, or WAV

For lossy podcast-style use, -c:a libmp3lame -q:a 2 gives a high-quality VBR MP3 (~190 kbps). For lossless archive use, copy if the source audio is already AAC/MP3 (-c copy) — no quality loss. For WAV (uncompressed, big), -c:a pcm_s16le.

Remove — silent video

-an drops the audio stream entirely. Useful for stock footage, overlay clips, or when you'll add new audio in an editor.

Replace — overdub

Take video from one file, audio from another. Two inputs, two -maps. Common for tutorial videos where you record screen capture silent then dub voiceover.

Code

Extract audio·bash
# To MP3 (high VBR quality)
ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 2 output.mp3

# To M4A (AAC, smaller, modern)
ffmpeg -i input.mp4 -vn -c:a aac -b:a 192k output.m4a

# Lossless copy if source audio is already in a compatible codec
ffmpeg -i input.mp4 -vn -c:a copy output.m4a

# WAV for editing in Audition / Logic
ffmpeg -i input.mp4 -vn -c:a pcm_s16le output.wav
Remove and replace audio·bash
# Silent video
ffmpeg -i input.mp4 -an -c:v copy silent.mp4

# Replace audio entirely with a separate track
ffmpeg -i video.mp4 -i voiceover.wav \
  -map 0:v:0 -map 1:a:0 \
  -c:v copy -c:a aac -b:a 192k -shortest \
  out_dubbed.mp4

# -shortest = stop when the shorter stream ends (avoids a frozen tail)

External links

Exercise

Pick a video with a music track. Extract audio three ways: MP3 at -q:a 2, AAC at -b:a 192k, and WAV. Note the file sizes. Listen to all three on headphones — can you hear a difference? Then make a silent version of the original (-an) and confirm with ffprobe that no audio stream remains.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.