How to Map All Video and Discard Audio in FFmpeg

This article provides a quick guide on how to use FFmpeg to select and map every video track from an input file while completely excluding all audio, subtitle, and other data tracks. You will learn the exact command-line syntax required to perform this stream selection efficiently without losing video quality.

To map all video tracks and discard all audio and subtitle tracks, you need to use FFmpeg’s -map option combined with stream specifiers.

Here is the standard command to achieve this:

ffmpeg -i input.mkv -map 0:v -c:v copy -an -sn output.mkv

How the Command Works

While -map 0:v is technically sufficient on its own to exclude other stream types, adding the -an and -sn flags acts as an extra layer of instruction to ensure absolutely no audio or subtitle metadata passes through to the output file.