Page 1 of 1

Script to remove unwanted subtitles and set subtitles to English (Forced) - if available

Posted: July 2nd, 2023, 4:05 pm
by JoshFink
Hi, I'm hoping someone can point me in the right direction. Either my searching is crap lately or this hasn't been asked in this way or similar before.

What I'm hoping to do for any media is remove all subtitles but English and English (Forced) and for any shows that have "English (Forced)" subtitles set those as the default.

Is this possible with a script or is this something that I would need to undertake manually for each show?

Thanks for the help

Re: Script to remove unwanted subtitles and set subtitles to English (Forced) - if available

Posted: July 16th, 2023, 12:54 pm
by sander
Is this possible with a script or is this something that I would need to undertake manually for each show?
It is possible with a script (which I haven't got for you), but this might help you to create a script:

Find info about audio and subtitles:

Code: Select all

mediainfo blabla.mkv
To set Subtitle track #1 as default and forced:

Code: Select all

mkvpropedit --edit track:s1 --set flag-default=1 --set flag-forced=1 blabla.mkv
To set Audio track #1 as default and forced:

Code: Select all

mkvpropedit --edit track:a1 --set flag-default=1  --set flag-forced=1 blabla.mkv