0

This related post gives a solution:

mkvmerge -o output.mkv input.mkv -S # remove all subtitle tracks

This other related post gives a solution:

ffmpeg -i input.mp4 -c:v copy -c:a copy -map_metadata 0:g -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -movflags +faststart -threads 8 -sn removed.mp4

However, both of these solutions require "streaming" all the video/audio tracks to another file, and just skip adding the subtitle streams. Is it possible to simply remove the subtitle track(s) from a movie file without having to stream anything?

Streaming video/audio tracks require significant resources, time, and is basically a remux. I'd like to simply remove the embedded subtitles and touch nothing else... Usually it is a .mkv file, but it could be other formats (e.g. .mp4 as well).

3
  • Not possible with ffmpeg.
    – llogan
    Aug 3, 2020 at 23:55
  • Is it possible some other way (such as @Moab's comment)? I didn't specifically ask for a way to do this using ffmpeg. I have edited the title, and I will leave ffmpeg since it is quite relevant and is a popular tag.
    – Abraham
    Aug 4, 2020 at 3:26
  • what would be a better tag to add?
    – Abraham
    Aug 4, 2020 at 3:29

1 Answer 1

3

The -sn option does exactly that.

https://ffmpeg.org/ffmpeg.html#Subtitle-options

-sn (input/output)
...
As an output option, disables subtitle recording i.e. automatic selection or mapping of any subtitle stream. For full manual control see the -map option.

Example:

ffmpeg -i video.mkv -c copy -sn video.sn.mkv

4
  • 1
    Thanks for your suggestion. I don't think it answers the question though, due to it still requiring "streaming" of the video/audio tracks as described in my post. Additionally, in my post, I put a command that already includes the -sn option.
    – Abraham
    Aug 30, 2022 at 21:09
  • Now I understand what you want to achieve. I'm not sure if ffmpeg is able to overwrite the source file directly. Also if something goes wrong, the source file will get corrupted. It would be cool to have a tool that lets us open the file as if it were a folder, so that we would then be able to remove its content just like we do when using a file explorer/manager. But I'm not sure that such a tools exists.
    – manero
    Feb 15 at 12:32
  • Thanks, you described it a bit better than I did -- "opening the file like a folder and taking out a particular track". This explanation makes sense (with the consequence that you will have to essentially make a copy of the original file with modifications such as removing a track).
    – Abraham
    Feb 28 at 15:21
  • Note that if the file contains multiple audio streams then this command will remove all but one of them! Add the parameter -map 0 to only affect subtitle streams.
    – yzfr1
    Apr 2 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .