mediacodec.dev

Remove audio from a video

Muting in a player hides the audio; this removes it. The video stream is copied untouched, so the operation is lossless and takes about as long as reading the file. The only real decision is whether the output should have no audio track at all, or a silent one.

Result

-an

-an drops audio entirely. Smallest file, cleanest result, the usual choice.

Most tools cope fine with a video that has no audio track. Some strict pipelines (broadcast ingest, certain editors, some social platforms) expect one to exist, and for those you ship silence instead.

Your command

ffmpeg -i input.mp4 -an \
  -c:v copy \
  output.mp4

Worth knowing

-c:v copy is what makes this instant: the video packets move to the output untouched, so nothing is re-encoded and nothing is lost.

In the silence variant, -shortest stops the output when the video ends; without it, the infinite anullsrc source would run forever.

The mirror-image job, keeping only the audio, has its own page: extract audio.

Run this on your own file

no FFmpeg · runs in this tab

The command above needs FFmpeg on a machine. The settings it encodes do not: your browser can perform the same operation on a real file, right here, through WebCodecs.

Drop a video or audio file here, or

Files are processed in this tab and never uploaded.

The same operation as -an -c:v copy: the audio track is dropped and the video packets pass through untouched where MP4 allows, which is why it finishes almost instantly.

Waiting on a file.