Create full and forced subtitle tracks from mpls/m2ts files

Hello,

a subtitle track within a mpls or m2ts file can contain entries that are marked as forced and entries that are not marked as forced.
In MKVToolNix for remuxing I can only choose to keep the subtitle track with all entries or drop the whole track.
I would like to have the possibility to add the track to the output file but only with the entries in it that are marked as forced.
In fact, it would be optimal to be able to add the same track twice to an output file: one time with all the entries in it (as it is possible now) and a second time with only the entries marked as forced in it.

How are the chances that such a feature gets added to MKVToolNix?

Thank you for giving us this great tool.

Welcome!

Chances aren’t good, to be quite honest. The problem is that mkvmerge needs to know what tracks there are right from the start. With the “forced” entries being entirely optional, knowing whether or not there are any up front would require parsing the whole M2TS file, which can take minutes. That would happen during file identification, or to put it differently, each time you add an M2TS to MKVToolNix GUI.

Another way of dealing with this is what MakeMKV does: for each PGS subtitle track mkvmerge could assume that there are two subtitle tracks, one for non-forced, one for forced only. Upon completion of muxing it could then remove the ones that don’t actually have any entries in them. However, that poses a lot of different issues to mkvmerge:

  1. Splitting: when splitting is active mkvmerge will finalize each file as soon as it decides to no longer write stuff to it. Now imagine a scenario where there are only a handful of forced entries in the later half of the movie, but none in the beginning. In such a case mkvmerge might remove the “forced” track from the first file but leave it in in the second one. The interesting problem here is is you later to decide to re-combine both halves: that wouldn’t work as mkvmerge requires the same number & types of tracks in each appended file (simplified), but the first one would actually have one track less, preventing appending of the “forced” track from the second file.
  2. The GUI would always show those “forced” tracks, even if there might not be one. I find this confusing as a user when you mux something, expect the output to have four subtitle tracks, but you only find three in your player. I can imagine all the support requests already.

Another alternative is to always expose the “forced” track & not to remove it, even if there are no forced entries. I don’t think this to be any less confusing.

Due to all this I decided long ago not to implement such a feature.

Thanks for your quick reponse.

In fact, I would prefer to keep empty tracks caused by such a feature over removing them or check for entries before creating them, if it should get implemented one day.
It’s quite similar to keeping subtitle tracks when splitting files where some parts don’t contain entries after splitting.

It may reduce confusion for users if implemented as command line argument only feature like some other options that can only be given on the command line (or the field for additional command line arguments in the GUI).

In my personal use case I would know beforehand if a subtitle track has a subset of forced entries. And sometimes I would deliberately create that second forced-entries track even if I know it would be empty, eg. if every episode of a show has some forced subtitles except for one episode, so that video players offer the same list of subtitle tracks to choose from for every episode of a show.

Currently I use MakeMKV to create those subtitle tracks followed by mkvmerge to extract them from the file MakeMKV created and to add them to the final remuxed output file. But it would be much easier to simply let mkvmerge create these additional forced subtitles tracks directly from the input file.

Sure, I get that. Doesn’t really change my mind, though.