2

I have several Movies/Animes with many subtitles, and I want disable all (not remove) subtitles in a batch (.bat file); below current code:

for %%a in (*.mkv, *.mp4) do (
    REM disable subtitles
)

How could this be done?

5
  • What did you try?
    – PierU
    Commented Nov 18, 2022 at 12:55
  • Take a look here How to disable subtitles decoding in ffmpeg
    – Hackoo
    Commented Nov 18, 2022 at 13:19
  • @Hackoo Your link gives a solution to remove the subtitles, but the OP explicitly said that it does not want to remove them, just disabling them (no subtitle with the "default" flag)
    – PierU
    Commented Nov 18, 2022 at 13:34
  • @PierU did not find any that help, ffmpeg only remove subtitles
    – Ricardo
    Commented Nov 18, 2022 at 14:23
  • 1
    It has to do with the -disposition and -infer_no_subs options. But in my experience it's quite tricky to use... When I'm at home I can retrieve the exact way to use them.
    – PierU
    Commented Nov 18, 2022 at 15:09

1 Answer 1

2

In a recent past I found by trial and errors how to set/unset the default subtitle tracks on the output file.

Same default track as in the input file:

-default_mode infer_no_subs

No default track:

-default_mode infer_no_subs -disposition:s -default

or

-default_mode infer_no_subs -disposition:s none

Force a default track:

-default_mode infer_no_subs -disposition:s:2 default (sets the 3rd track as default)

Note: if no option at all is coded, the 1st track is always the default track

You must log in to answer this question.

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