Forced subtitle label

Everything related to MakeMKV
mike admin
Posts: 4083
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: Forced subtitle label

Post by mike admin »

Chetwood wrote:
Ghostm wrote:any time i tried to quote you, it seemed to be pending moderator approval and i have no idea why it was not posted.
Beats me, why I was moderated, there were no swear words and I even forgot I was in the moderation queue so I posted something similar again. Oh well.
The [URL] tag enables auto-moderation, even if url points to this site. This will be fixed eventually. In-line links to this site do not enable auto-moderation.
Romansh
Posts: 873
Joined: Sat Jan 22, 2011 7:09 pm

Re: Forced subtitle label

Post by Romansh »

mike admin wrote:The [URL] tag enables auto-moderation, even if url points to this site. This will be fixed eventually. In-line links to this site do not enable auto-moderation.
Any way this could be made dependent on the post count as well?
nevcairiel
Posts: 8
Joined: Fri Feb 22, 2013 10:04 pm

Re: Forced subtitle label

Post by nevcairiel »

Chetwood wrote:Which would require additional logic for people like me who always rip both English and German tracks. So if I were to watch Avatar in english with english subs, having two forced tracks automatically flagged as forced might cause problems.
Actually, not really, as long as the player does what the MKV spec tells it to do in this case, and otherwise has a smart stream selection.

Here is an excerpt from the MKV Spec regarding the "forced" flag:
There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track.
Right now i manually flag the appropriate sub streams as forced to get players to behave properly, but automation would be nice, even if its only possible in a custom profile.
smol_birb
Posts: 53
Joined: Fri Mar 28, 2025 9:09 pm

Re: Forced subtitle label

Post by smol_birb »

mike admin wrote:
Wed Feb 13, 2013 7:47 am
Chetwood wrote:
paulster wrote:but it would be a whole lot more useful and less time-consuming than it is currently to name the tracks.
So how about adding placeholders to the conversion profiles for subs (and audio)

%L: language
%F: encoding format

which results in "German/VobSub" or "English/Lossless" or something?
This is a great suggestion. Track name templates will be the next feature for conversion profiles.
Has the track name template feature been added to conversion profiles yet? If so, how are they used? I can't see where the option would be in the original post on the conversion profile XML schema.
Chetwood
Posts: 999
Joined: Mon Aug 30, 2010 9:16 am

Re: Forced subtitle label

Post by Chetwood »

I don't think it has but you could try and see for yourself. Enable 'expert' mode under preferences and then the output filename template is on the advance tab.
MultiMakeMKV: MakeMKV batch processing (Win)
MultiShrink: DVD Shrink batch processing
Offizieller Uebersetzer von DVD Shrink deutsch
flojo
Posts: 264
Joined: Thu Jun 22, 2023 4:27 am
Location: El Paso

Re: Forced subtitle label

Post by flojo »

nevcairiel wrote:
Fri Feb 22, 2013 10:08 pm
Right now i manually flag the appropriate sub streams as forced ...
Not exactly sure what you mean, but the below will add "Forced" to the track names of tracks flagged as forced. I assume if they're not flagged or tagged in some manner then MakeMKV cannot determine it at which you'd always have to manually go through them.

Code: Select all

#!/usr/bin/env python3
# Usage: ./scriptname.py3 filename.mkv (0 error checking, requires "mkvmerge" and "mkvpropedit")
import subprocess, sys, json, re
tracks = json.loads(subprocess.run(["mkvmerge", "-J", sys.argv[1:][0]], capture_output = True, text = True).stdout)["tracks"]
for t in tracks:
  if t["properties"]["forced_track"]:
    track_name = "Forced"
    if "track_name" in t["properties"]:
      if re.search("(?iu)^forced", t["properties"]["track_name"]):
        continue
      track_name = "Forced: " + t["properties"]["track_name"]
    subprocess.run(["mkvpropedit", sys.argv[1:][0], "--edit", "track:" + str(t["id"]+1), "--set", "name=" + track_name ])
Post Reply