Log in

View Full Version : How do I use ffmpeg forced_subs_only option?


unknownsoldierX
6th December 2018, 10:28
Windows 7x64

I just discovered the ffmpeg option "-forced_subs_only 1" and I can't get it to work.

for %%f in ("*.mkv") do %ffmpeg% -forced_subs_only 1 -i "%%f" -map 0:s:0 "%%~nf.srt"

Still extracts all subtitles, flagged forced or not.

for %%f in ("*.mkv") do %ffmpeg% -i "%%f" -map 0:s:0 -forced_subs_only 1 "%%~nf.srt"

Doesn't extract anything, just gives this message:

Codec AVOption forced_subs_only (Only show forced subtitles) specified for output file #0 (movie.srt)

sneaker_ger
6th December 2018, 10:40
There are no forced flags (per line) for srt subtitles. That is something you find on DVD or Blu-Ray subtitles.

unknownsoldierX
6th December 2018, 10:48
Ok. I misunderstood the purpose of that command.

When I look at an mp4 or mkv using something like mediainfo, it shows the subtitle streams and sometimes it says they are forced. Is there a way to extract only subtitle streams that have that flag set?

edit: It looks like what I want to do is extract subtitles based on disposition, but so far I can't see any mention of being able to do that with ffmpeg.

kuchikirukia
8th December 2018, 23:50
I don't think you can do it with gMKVExtract GUI either, but if they all have the same name or language you can do it that way.