I’m using the MCEBuddy to automate the process of adding metadata, renaming & moving my MKV files without further encoding. I’d like to take it a step further & remove foreign subtitles. I’ve tried the MKV Unprocessed profile & renaming without conversion, but can’t figure out what adjustments to make in order to achieve this. I’ve struggled through the documentation and have no doubt it would be clear as day to someone with experience in this arena, so I’m hoping someone will take pity and provide me instruction.
I attempted to play with subtitles and was only somewhat successful. The handbrake CLI does have a command to set the default lang. It will grab all the english tracks, and only the english tracks while discarding the rest. If the tracks are unmarked (und) it will grab all the tracks you specify (–subtitle “1,2,3,4,5”).
It works well, but is buggy, at least with the handbrake cli. The problem is when your file has PGS subs. Handbrake doesn’t handle them properly and always wants to either burn them right into the file (if output is mp4), or set them as forced (for mkv). Burned is a big no-no for me, and forced is a nuisance that needs to constantly be turned off in plex per each file.
I eventually gave up and just decide the pass the first 5 subs. English is always first or second, and is always within the first 5 etc, so it works. Not elegant, or efficient, but works
You can try adding
to your handbrake-general. This should select the first english track for you. All other tracks are discarded.
If you add
–subtitle-lang-list “eng” --all-subtitles
it should keep all the english tracks. So if you have english, english forced, and english commentary, sing along etc - it would keep all of them.
–subtitle-lang-list “eng” --subtitle “1,2”
it should keep the first two english tracks. Usually this would be english forced and english.
It’s been a while since i played with these commands, so i don’t remember what happens when you run into UND. I think it just skips it. I do remember that PGS subs wreaked all kinds of havoc. Sometimes they would skip, sometimes they would burn in or be marked forced when they shouldn’t be etc. All other subs other then PGS worked great.
I’m not clear as to why I need to extract the subtitles since I’d like to keep them in the container. I also ran various versions of the MKV Unprocessed profile to see what changed (audio set to default vs english, extract subs, etc) and didn’t notice any difference.
I like @zhulick’s suggestion of tweaking the code. I’ll give that a go & report back in a couple days. Wish me luck!
That’s how MCEBuddy works. Not all formats and underlying encoders support all features, so it’s a step 2 process. First extract all the pieces and then put them back together in the required format. See the how MCEBuddy works page for more details.
If you want to add it back to the final output container in the Expert Settings page of the conversion task check the box for Add subtitles
In my effort to figure things out, i’m pretty sure i broke something. I’m trying to copy all the video, audio & subtitle streams without any re-encoding, as well as rename the file & and embed the poster & metadata. I’m only able to keep all the streams when I select “Rename without converting”, but then the metadata & poster aren’t embedded. How can I keep all the streams & embed the poster & metadata?
I’m pretty sure that “rename without converting” does exactly what it says and nothing more - it will rename and copy a file without touching anything in the file . It’s a very useful feature when you need to quickly rename a bunch of DVR recordings into a format Plex could understand, but i am not sure that it will do what you want it to do.
In fact, i’m not sure that you can do what you want to do in mcebuddy without it having to work the file somehow. I’m not a 100% sure on this, but i think even a minor change like appending the metadata and poster info requires the mkv to be remuxed/rebuild again.
You can try to pass through all the audio and video through the -copy and -copy-mask commands in the cli. You’d need to specify all the formats you want to pass etc. That should trick mcebuddy into remuxing all your existing streams into a new file, eventhough none of the streams are actually touched. During this process it should be able to add metadata. That said, i have no idea if that would actually work. It should, but …
I’m building my Plex movie library to watch offline & it’s metadata function are spotty. The other day I left the house & it show A Simple Favor (2018) as Madagascar (2005). I’m trying to build something foolproof, but I’m feeling a little too much the fool.
Hopefully Goose will shed some light on this & offer a solution.
Good news, it seems the sample I was working with was corrupt & contributing to my issues. I’ll try some more tests tomorrow & hopefully get this sorted out.