INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]   Go Down

Author Topic: Forced subtitles  (Read 18785 times)

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Forced subtitles
« Reply #50 on: June 26, 2015, 07:40:49 pm »

Right. And if you are prepping it, you can make your own "forced" subtitles with sidecars by following either of these filenaming rules:


Those naming rules may need a little verification in the current version of MC. I did some quick testing a week or so ago with an srt sidecar and found:

If the name matched the video file exactly, it was presented as available but was not automatically selected.

If the name was anything other than an exactly match the sidecar srt file wasn't available for selection as subtitles. This was true even if name matched exactly, except for a suffix of ".en" or ".eng".

My testing wasn't thorough though, so it could have been something to do with the sample video name I was using, or anything else. Hence, the rules need verification.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Forced subtitles
« Reply #51 on: June 26, 2015, 08:31:23 pm »

We should verify. I went through a LOT of change logs to dig those up.

Keep in mind, it is [Name], not Filename, though. I embed mine so I had none to test.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Forced subtitles
« Reply #52 on: June 26, 2015, 10:53:55 pm »

Ah. I have misread the Wiki then.

I did take the [Name] mentioned in there as the file name, based on the use of the term [Extension] in the same sentence, which in the case of subtitles in a sidecar file, would be "srt", and therefore must refer to the file extension. After all, it couldn't be the video file extension, or [File Type] tag, and there is no [Extension] field in the Library.

I only have one example to work with, as I also use embedded subtitles for the few files I need forced subtitles as well. But I might have another play with that sample and see what it does.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Forced subtitles
« Reply #53 on: June 26, 2015, 11:51:47 pm »

I did take the [Name] mentioned in there as the file name

As I said, I don't have any so I couldn't test it, but I'm reasonably sure it means [Name].  There are multiple instances where Matt has specifically called out the additional rule (which was added at a separate, and much more recent time) about exactly matching filenames that get elevated priority as well. Why would you need to change this if it was already filename based?  Obviously then that would be included, because you already (in v17) had a rule where [Name].srt with no language identifier would get used first.  Why in v18 or 19 (I don't remember when, but it was later) add something specific about exactly matching filenames?

That makes no sense.  Also, the thing about [extension] is, I suspect, just a "generic" to denote that it works with all the different types of subtitles that MC supports (it isn't format specific).  It would be verbose to say [Name].srt (and also .sub and all the other 10 types of subtitles it supports).

One thing I couldn't find at all, that irked me, was a description of how the language identifiers should be named.  Does it use three character language names?  Two character abbreviations (like country codes)?  Is a dash between required?  Is it forbidden?  What about an underscore?

I suspect that for the latter that it strips out special characters and just looks at the alpha characters (so it doesn't mater if you do [eng] or -eng or _eng).  But I couldn't find any discussion about the language identifiers at all, and I spent maybe an hour and a half searching the forum.  I'm reasonably adept at forum searching here, so...?

Dunno.  Could use a concerted effort to test and document from someone who cares.  If someone does do it, I'll write it up in the wiki if you give me good details, and have documented testing procedures.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Forced subtitles
« Reply #54 on: June 27, 2015, 12:09:50 am »

My rough guess at the ruleset, if I read everything correctly (and I closed all those tabs and am not going to re-search tonight) is something like:

1. User selected subtitle (remembered from a previous load, or manually browsed).
2. If Tools > Options > Video > Subtitle mode is anything other than Do Not Show then load the appropriate subtitle based on the setting in the same section.
3. If the setting is Do Not Show, then load subtitles tagged as forced.
-- I don't know how the rest is impacted by Do Not Show vs the other Subtitle modes but I think this is the priority order --
4. If no subtitles are tagged as forced, but a sidecar exists that is named [Name].ext (with no language identifier) then load this. I suspect these are effectively "treated as forced", but I don't know that for sure, you might need to have the "or sidecar subtitles" mode enabled to get them.
5. Otherwise if a subtitle exists that has a name that matches exactly [Filename (Name)].ext load that.
6. Load subtiles that match the selected subtitle language if they exist (either embedded or using [Name]-language.ext style) and if the subtitle mode is set to one that says they should.

It is complex, though, because of all the various subtitle modes. I think that's probably why Matt hasn't commented. He might not know. A lot of this was done a long time ago, and memory fades, and if the code is complex, it might take him half a day to look at the source and sort it all out (not remembering what he was doing at the time). Or, he just didn't read this thread (but I think that's unlikely).

Dunno.  If someone cares, it'd be nice to know exactly how it works and get it a little better documented.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: 1 [2]   Go Up