TechEarl

How to Remove Audio From a Video (Mute It) with ffmpeg

Remove audio from a video with ffmpeg in one command: -an drops the track, -c:v copy keeps the video lossless and instant. Plus muting only part of a clip and dropping one track from a multi-track file.

Ishan Karunaratne⏱️ 7 min readUpdated
Share thisCopied
Strip or mute audio from a video with ffmpeg using -an and -c:v copy, silence only part of a clip, or drop one of several audio tracks.

To drop the audio from a video and keep the video exactly as it was, run:

bash
ffmpeg -i in.mp4 -an -c:v copy out.mp4

That is the whole job for the common case. -an means "no audio", so ffmpeg drops every audio stream. -c:v copy tells it to copy the video stream through byte-for-byte instead of re-encoding it, so the command is instant and the video quality is identical to the source. You will also see this written ffmpeg -i in.mp4 -c copy -an out.mp4, which is the same thing: -c copy copies all streams and -an then drops the audio, so the video is still passed through untouched. On a 2 GB file it finishes in under a second, because ffmpeg is just reading the container, discarding the audio, and writing the video bytes straight back out. The rest of this page is the detail behind that: why copy matters, muting only part of a clip, and dropping one track when a file has several.

Drop the audio track with -an

-an is the flag that drops audio in ffmpeg. It stands for "no audio" and disables every audio stream, so none of them make it into the output. Pair it with -c:v copy to keep the video stream as-is (no re-encode), which is what makes dropping the audio instant and lossless rather than a slow full transcode. The two flags together are the canonical answer: -an to drop all audio, -c:v copy (or -c copy) to leave the video bytes alone.

Why -c:v copy and not a re-encode

If you leave -c:v copy off, ffmpeg re-encodes the video to its default codec, which is slow, costs you a little quality, and gains you nothing here. You are only removing the audio; the video frames do not change, so there is no reason to touch them.

bash
# Lossless and instant: copy the video, drop the audio
ffmpeg -i in.mp4 -an -c:v copy out.mp4

# Slower, lossy, and pointless for a simple mute (re-encodes the video)
ffmpeg -i in.mp4 -an out.mp4

-c copy (no :v) copies all streams, but since -an has already removed the audio, -c:v copy and -c copy do the same thing here. I write -c:v copy to be explicit that the video is what I am preserving.

One thing to know: stream copy works only when the output container accepts the source video codec. Copying an H.264 stream into another .mp4 or .mkv is fine. If you change the container to something that cannot hold that codec, ffmpeg will refuse the copy and you will have to re-encode. For mute-and-keep-the-same-format, that never comes up.

Remove the track vs silence the track

There are two different things people mean by "mute a video", and they produce different files.

  • Remove the audio track (-an): the output has no audio stream at all. The file is smaller and most players show no audio track. This is what you want for a background-video loop, a GIF-style clip, or stripping a copyrighted song before re-upload.
  • Silence the audio (set volume to 0): the audio track still exists, it just plays as silence. The file size barely changes. You would do this only if a downstream tool or player insists on a present audio stream.

Removing is the default and almost always the right choice. To silence the whole track instead of removing it:

bash
# Keep an audio track, but make it silent throughout
ffmpeg -i in.mp4 -af "volume=0" -c:v copy out.mp4

Note that the moment you touch the audio with a filter (-af), that audio stream is re-encoded. The video is still copied untouched because of -c:v copy.

Mute only part of a clip

To silence a section and leave the rest of the audio alone, use the volume filter with an enable expression. This silences the audio between the 5-second and 10-second marks and plays it normally everywhere else:

bash
ffmpeg -i in.mp4 -af "volume=enable='between(t,5,10)':volume=0" -c:v copy out.mp4

The enable='between(t,5,10)' part turns the filter on only inside that time window (t is the timestamp in seconds), and volume=0 is what it does while it is on. Change the two numbers to whatever range you want to bleep. You can chain more than one window if you need to mute several spots: repeat the between pattern inside an or expression, for example enable='between(t,5,10)+between(t,30,35)'.

Because this is a filter, the audio is re-encoded; the video still copies through with -c:v copy.

Drop one of several audio tracks

-an removes every audio stream. When a file has more than one (a film with separate language tracks, say) and you only want to drop one, do not use -an. Instead, -map the streams you want to keep:

bash
# Inspect the streams first
ffmpeg -i in.mkv

# Keep the video and only the first audio track, drop the second
ffmpeg -i in.mkv -map 0:v -map 0:a:0 -c copy out.mkv

-map 0:v keeps all video from input 0, and -map 0:a:0 keeps the first audio stream from input 0. Anything you do not -map is left out of the output, so the second audio track simply does not make it in. The stream indices (0:a:0, 0:a:1) come from the ffmpeg -i in.mkv output, which lists every stream and its index. -c copy keeps the kept streams lossless.

Where this fits

Removing audio is one small operation in a larger toolkit. If you are stripping the audio because you actually want the sound as a separate file, see extract audio from a video with ffmpeg, which keeps the audio and drops the video instead. If you are removing one audio track to put a different one in its place, add or replace an audio track on a video covers muxing the new track in. And for every common ffmpeg operation in one reference, the ffmpeg command cheat sheet is the hub.

FAQ

ffmpeg -i in.mp4 -an -c:v copy out.mp4. -an drops all audio, and -c:v copy copies the video stream without re-encoding, so it is instant and lossless.

-an stands for "no audio". It tells ffmpeg to leave every audio stream out of the output. There is a matching -vn ("no video") that does the opposite and is what you use to extract just the audio.

No, as long as you pass -c:v copy. That copies the video stream through unchanged, so the output is bit-for-bit identical video with the audio gone. Leaving -c:v copy off re-encodes the video, which is slower and slightly lossy for no benefit.

Use the volume filter with a time window: ffmpeg -i in.mp4 -af "volume=enable='between(t,5,10)':volume=0" -c:v copy out.mp4. That silences seconds 5 to 10 and leaves the rest of the audio playing.

Do not use -an (it removes them all). Run ffmpeg -i in.mkv to see the stream indices, then keep the ones you want with -map, for example -map 0:v -map 0:a:0 -c copy out.mkv to keep the video and only the first audio track.

See also

Sources

Authoritative references this article was fact-checked against.

Tagsffmpegremove audiomute videostrip audioCLIvideo

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Software Systems Architect · Senior Software Engineer · Engineering Leadership

Software systems architect and senior software engineer with more than two decades designing, building, and running production software, Linux systems, and DevOps infrastructure, and lately working AI into the stack. Now a CTO, though what I write here is drawn from the full arc of that work, across architecture, engineering, and operations, not any single job.

Keep reading

Related posts

Extract audio from a video with ffmpeg by copying the stream untouched (fast, lossless) or re-encoding to MP3, AAC, or WAV when you need a different format.

How to Extract Audio From a Video with ffmpeg

Pull the audio out of a video with ffmpeg: copy the stream untouched when you just want to demux (fast, lossless), or re-encode to MP3, AAC, or WAV when you need a different format. Plus how to check the source codec first and grab a single segment.

Reverse a video from the command line with ffmpeg: the reverse video filter, the areverse audio filter, and the new-output-file rule that keeps the source intact.

How to Reverse a Video with ffmpeg

Reverse a video with ffmpeg using the reverse filter for picture and areverse for sound. Why you must write to a new output file, and why you trim before you reverse.

Trim or cut a video from the command line with ffmpeg using -ss and -to or -t, the fast lossless stream-copy way and the frame-accurate re-encode.

How to Trim or Cut a Video with ffmpeg

Trim or cut a video from the command line with ffmpeg: the fast lossless -c copy way, the keyframe gotcha that makes your cut land early, and the frame-accurate re-encode. With -ss and -to/-t explained.