How to remove audio from a video with ffmpeg
Quick answer
Run ffmpeg -i input.mp4 -c copy -an output.mp4: -c copy copies the video without re-encoding and -an leaves out the audio. The picture keeps its original quality, and the command finishes in seconds even for long videos.
Install ffmpeg
ffmpeg is free and open source. The download page on ffmpeg.org links to ready-made builds for Windows, macOS and Linux. On a Mac with Homebrew you can install it with brew install ffmpeg, and most Linux distributions have it in their package manager. On Windows, unpack a build and add its bin folder to your PATH so the ffmpeg command works in any terminal window. Run ffmpeg -version afterwards to check that it is installed.
The basic command
Open a terminal (Command Prompt or PowerShell on Windows, Terminal on Mac or Linux) in the folder that contains your video and run:
ffmpeg -i input.mp4 -c copy -an output.mp4- -i input.mp4 is the source file. Put the name in quotes if it contains spaces.
- -c copy selects stream copy: the video is copied without decoding or encoding, so quality, resolution and frame rate stay the same.
- -an disables audio for the output, so no audio stream is selected.
- output.mp4 is the new file. Use the same extension as the source to keep the container.
The command works the same way for MOV, MKV and WebM files. Because nothing is re-encoded, it usually runs as fast as the disk can read and write the file.
Keep every other track
Without -map, ffmpeg picks one stream of each type, so an MKV with several video angles or subtitle tracks can lose some of them. To keep everything except the audio, map all streams and then remove the audio streams with a negative map:
ffmpeg -i input.mkv -map 0 -map -0:a -c copy output.mkv-map 0 selects every stream from the first input and -map -0:a removes all of its audio streams again.
Phone recordings in MP4 or MOV sometimes contain data tracks that can’t be copied into a new MP4 with -map 0, and ffmpeg stops with an error. For those files, the basic command without -map is the safer choice.
Mute a whole folder
Write the results to a separate folder so the loop doesn’t pick up its own output files. In PowerShell on Windows:
mkdir muted
Get-ChildItem *.mp4 | ForEach-Object { ffmpeg -i $_.FullName -c copy -an (Join-Path muted $_.Name) }In Terminal on macOS or Linux:
mkdir -p muted
for f in *.mp4; do ffmpeg -i "$f" -c copy -an "muted/$f"; doneChange *.mp4 to *.mov or another extension to process other files. Each original stays untouched, and the silent copies keep the same names inside the muted folder.
Check the result and fix common problems
ffprobe comes with ffmpeg and can list the audio streams in a file. If the command below prints nothing, the file has no audio:
ffprobe -v error -select_streams a -show_entries stream=index -of csv=p=0 output.mp4- "ffmpeg is not recognized": ffmpeg is not installed or not on your PATH. Install it, then open a new terminal window.
- The output won’t play in a browser: the video codec is copied as it is, so a file the browser couldn’t play before won’t play after.
- You need to cut the video at the same time: add -ss and -to before the output name, but note that with -c copy the cut snaps to keyframes, so the start may shift slightly.
Don’t combine -an with a video codec option like -c:v libx264 unless you want to re-encode. That makes the job slower and the picture no longer identical to the original.
Questions and answers
Does -an reduce the video quality?
No. -an only affects audio. Combined with -c copy, the video stream is copied bit for bit, so resolution, frame rate, bitrate and quality stay the same.
What is the difference between -an and -map -0:a?
-an turns off audio selection for the output. -map -0:a removes audio streams from an explicit mapping, which you use together with -map 0 when you want to keep every other track, such as several subtitle streams.
Can ffmpeg remove only one of several audio tracks?
Yes. Use a negative map for that track only, for example -map 0 -map -0:a:1 removes the second audio stream and keeps the rest.