How to Remove Subtitle Tracks with FFmpeg
To remove subtitle tracks with FFmpeg without re-encoding the video, map the input streams, copy their encoded contents, and exclude subtitles from the output:
RemoveText.video · Published · Updated
ffmpeg -n -i "input.mkv" -map 0 -c copy -sn "output-no-subtitles.mkv"This creates a separate file. It applies to subtitle streams inside the container, not lettering already drawn into the picture. The explicit mapping matters: a shorter command can remove subtitles while also leaving out an audio language you intended to keep.
Use the recipes below after inspecting your actual file. The stream numbers in an example are not safe guesses for another recording.
Before running a command
You need both ffmpeg and ffprobe available in your terminal. The FFmpeg download page links to builds and packages for common operating systems. Check that both commands run before troubleshooting a media file:
ffmpeg -version
ffprobe -versionOpen a terminal in the folder containing your copy, or replace the example filenames with full paths. Quotes keep filenames containing spaces together. The commands are single lines, so there are no platform-specific continuation characters to adjust.
Keep different input and output names. Every FFmpeg recipe here includes -n, which refuses to overwrite an existing output. If that happens, choose another filename; do not replace your original just to make a command finish.
Inspect the streams before choosing what to remove
Run this inventory first:
ffprobe -v error -show_entries stream=index,codec_type,codec_name:stream_tags=language,title -of json "input.mkv"The report lists each stream's index, type, codec, and any available language or title tags. These fields are selected using the documented FFprobe output controls. A language label helps identify a track, but it may be missing or incorrect; confirm the relevant subtitle in a player when necessary.
Our generated test file contained this arrangement:
| Input index | Type | Codec | Language |
|---|---|---|---|
| 0 | Video | H.264 | Unspecified |
| 1 | Audio | AAC | English |
| 2 | Audio | AAC | Spanish |
| 3 | Subtitle | SubRip | English |
| 4 | Subtitle | SubRip | Spanish |
Your file may put subtitles between audio streams or contain attachments. Count from the report, not from the order shown in a player's language menu.
Remove subtitle tracks with FFmpeg and keep other streams
For the MKV example, use the opening command. Its three output options have separate jobs:
-map 0selects streams from the first input.-c copycopies selected streams without running their encoders.-snexcludes independent subtitle streams from this output.
The FFmpeg stream-selection documentation distinguishes manual mapping from automatic selection. In our test, removing -map 0 retained only one of two audio tracks. The command still completed, so a successful exit alone would not have revealed the missing language.
For a compatible MP4, keep the container as MP4:
ffmpeg -n -i "input.mp4" -map 0 -c copy -sn "output-no-subtitles.mp4"Selecting every stream can also retain attachments or data you did not need. That is useful for a preservation copy, but the destination container must support the retained streams. Read any muxer error instead of assuming subtitle removal caused damage.
Keep only video and all available audio
If your delivery needs only the picture and sound, select those types explicitly:
ffmpeg -n -i "input.mkv" -map 0:v -map "0:a?" -c copy -sn "output-av-only.mkv"This recipe retained both audio languages in our fixture and also worked on a video with no audio. The question mark makes the audio selection optional. Keep it quoted so the shell does not interpret it as a filename pattern.
This version intentionally omits subtitle, attachment, and data streams. A cover stored as a video stream can still match 0:v, however. It is not interchangeable with “preserve everything except subtitles.” Decide which extra streams belong in your delivery before choosing between the recipes. Chapter and container metadata are separate checks; a stream-count comparison does not validate every metadata field.
Delete one subtitle track and keep the rest
Suppose your inventory matches our table and you want to remove only Spanish subtitles. Select everything, then exclude the confirmed input index:
ffmpeg -n -i "input.mkv" -map 0 -map -0:4 -c copy "output-without-spanish-subtitles.mkv"The equivalent exclusion by subtitle-relative position is:
ffmpeg -n -i "input.mkv" -map 0 -map -0:s:1 -c copy "output-without-second-subtitle.mkv"These are alternatives. In this fixture, 0:4 means absolute stream index four, while 0:s:1 means the second subtitle stream. Both retained English subtitles and both audio tracks. Neither number identifies a language universally.
Do not add -sn to these commands: the purpose is to keep another subtitle stream. Inspect the output again because its stream indexes can change after one entry is removed. Never reuse an old index against a newly remuxed file without checking it.
Keep subtitles in one language
When the language tags are reliable, this recipe keeps video, all audio, and subtitles tagged eng:
ffmpeg -n -i "input.mkv" -map 0:v -map "0:a?" -map "0:s:m:language:eng?" -c copy "output-english-subtitles.mkv"It can select more than one English subtitle, such as a dialogue track and an accessibility version. If you require exactly one, inspect the inventory and select its specific stream instead.
The final question mark allows the command to succeed when no matching language exists. Our missing-language test produced a file without subtitles, as intended by that optional map. Omit that question mark if a missing match should stop your job. Either way, check the output; a mislabeled track cannot be corrected by mapping alone.
Keep the container choice deliberate
Start with the same container as the source when possible. Changing MKV to MP4 is an additional compatibility decision, even when the picture and sound use familiar codecs.
For example, our MKV fixture used SubRip subtitles; the MP4 fixture used mov_text. Removing all subtitle streams avoids carrying those subtitle codecs into the destination, but any retained video, audio, attachment, or data still has to fit. If you are keeping a subtitle language, its compatibility also matters.
Do not rename an extension to convert the file. If a command reports an unsupported codec or stream, review the selected streams and destination rather than silently adding a video encoder.
Read the error before changing the recipe
Failures at this stage often point to the filename, mapping, or output format. They do not necessarily mean that the source cannot be edited.
| Message or symptom | Check first |
|---|---|
| The input file cannot be found | Confirm the terminal's working folder and the full quoted path. |
| A stream map matches no streams | Recheck the input index, stream number, and language tag. Add an optional marker only when absence is acceptable. |
| The output already exists | Choose a new output name; -n is protecting the earlier file. |
| A codec is unsupported in the container | Review the retained streams and destination. Removing subtitles does not convert an incompatible audio codec. |
For a recurring export workflow, first settle these choices on one representative copy. Files from the same project can still contain different language tracks, so a hardcoded absolute index should not become a batch rule without an inventory check.
Verify the output before replacing a working copy
Check for remaining independent subtitle streams:
ffprobe -v error -select_streams s -show_entries stream=index,codec_name:stream_tags=language,title -of json "output-no-subtitles.mkv"On a successful probe, an empty streams array means no independent subtitle stream was listed. An error or unreadable file is not the same result.
Run the full inventory again and compare the audio languages, video codec, and intended track count. Then open the new file, switch between retained audio tracks, seek near the end, and check synchronization. Use the output filename to avoid accidentally reviewing the original.
For delivery where default or forced track flags matter, inspect the fuller ffprobe -show_streams report too. The compact inventory above intentionally leaves those fields out; it should not be treated as proof that every playback preference survived unchanged.
Test scope: these recipes were checked with FFmpeg 6.1.1 on generated H.264/AAC files containing two subtitle languages. Both the MKV and MP4 full-removal outputs retained two audio tracks and zero subtitle streams. The 30 video packets and 142 packets in each audio track had matching payload hashes before and after copying. Additional checks covered missing audio, missing subtitles, language selection, and an MKV attachment.
Those results validate the tested recipes and samples. They do not guarantee every codec or damaged input, and a rebuilt container is not a byte-for-byte copy of the source file.
The tracks are gone, but words still appear
A player may automatically load a neighboring SRT or ASS file. Test the output in an otherwise empty folder and disable player captions. The VLC subtitle guide explains that playback check.
Some closed captions travel inside the video bitstream rather than as independent subtitle streams. They can remain switchable after -sn. FFmpeg's bitstream-filter documentation describes this separate case and shows why indiscriminate SEI removal is risky: it can also remove other information, including dynamic HDR metadata.
Finally, the words may be burned into the frames. Stream removal cannot erase those pixels. Return to the original project or consult the MP4 subtitle-type guide before choosing a visual editing method. Repeating the same remux command will not make embedded lettering disappear.