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

Come up with a useful post-processing script? Share it here!
Post Reply
JoshFink
Newbie
Newbie
Posts: 25
Joined: August 18th, 2010, 12:16 pm

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

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 9038
Joined: January 22nd, 2008, 2:22 pm

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

Post 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
Post Reply