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 remove 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. 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.

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

See also

Sources

Authoritative references this article was fact-checked against.

Tagsffmpegremove audiomute videostrip audioCLIvideo

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Tech Architect · Software Engineer · AI/DevOps

Tech architect and software engineer with 20+ years building software, Linux systems, and DevOps infrastructure, and lately working AI into the stack. Currently Chief Technology Officer at a healthcare tech startup, which is where most of these field notes come from.

Keep reading

Related posts

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.

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.

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.