Jump to content
The Dark Mod Forums

Subtitles - Possibilities Beyond 2.11


Geep

Recommended Posts

FYI, the findTooLongSubtitles program has been upgraded and is now available to download here.

It now has an additional feature. For a given maximum fieldwidth, if a subtitle can be accommodated within two lines, valid places to insert a manual linebreak are indicated by '|'. The subtitle author can then choose one, based on additional sentence structure considerations.

With a fieldwidth of 42, for the 2.11 New Job results posted here earlier, the analytic results are slightly improved, plus the '|' indicators appear:
Ā 

Spoiler

Ā 

Subtitles with One or Both Lines Longer than 42 Characters in Folder
<my dev machine's path>/[2.11]/newjob/subtitles/

Can a too-long subtitle be fixed - and often readability improved - just by manually adjusting the
word distribution between both lines?

- YES. Valid locations for a linebreak (based on length alone) are shown with '|' replacing ' '.
- NO. The reason is:
        *** because total text exceeds (2 * 42).
        --- because there is no acceptable candidate space between words at which to split.

Other solutions: convert inline to srt; subdivide srt phrases; non-verbatim editing;
edit to affect word-wrap; subdivide .ogg/.wav files.

Subtitles in briefing.srt, by srt phrase number:
6)      My job|is|to|acquire|valuable|items|for|the rich [48]
8)      but these items|are|usually|owned|by|someone already [52]
11)     Tonight I'm meeting|someone|who|wants|to|hire me for a job [58]
12)     I don't know the details yet but|an|associate of mine has vouched for him [73]
13)     and|the|message|managed|to|pique|my|interest [44]
14)     I'm supposed to meet my contact|in|a|courtyard south of Canonbury Tavern [72]
15)     Canonbury|is|popular|with|wealthy|travellers [44]
16)     and it just so happens that|a|Lord|Rothwick is staying there tonight [68]
17)     I'm told that he has a purse|full|of|very|expensive rubies with him [67]
18)     I've decided to arrive in the area a little early and engage in a bit of burglary [81]---
19)     A tavern won't have the same|level|of|security as a private estate [66]
20)     and it shouldn't be too difficult|to|find|what room Lord Rothwick is in [71]
22)     I can help myself to that purse and still|meet my contact in the courtyard on time [82]

Inline subtitles in fm_root.subs, by line number:
7)      The back alleys of Bridgeport. You can get almost anywhere unseen, if you know your way through the maze. [105]***
8)      I can probably get up on that|pipe|if|I|can find something to stack. [68]
9)      The City Watch makes the main streets a lot riskier. Even regular citizens might raise a hue and cry if they see someone dressed like me. [137]***
11)     There's the tavern. That guard in front is the problem. I'll need to distract him or find another way in. [105]***
12)     A one-eyed|guard.|This|must|be|my|lucky|day. [44]
13)     That's where I'm supposed to meet|my|contact. Looks like he's not here yet. [75]
15)     My work|here|is|done.|Time|to|meet|my|contact. [46]
17)     The old man says the Builders are harrassing the girls behind the Inn. Says it's bad for business [97]***
18)     What does he want us to do about it? Builders don't carry those hammers for decoration you know. They'll bash your skull in right quick and who's going to stop them? [165]***
19)     You think a Church court'll hang one of their own? A wink and a rap on the knuckles, that's what they'll get, and they'll be back on the street by breakfast. [157]***
20)     The City needs to put a stop to it! You let a dog roam free in the kitchen long enough and soon he thinks he owns all the food. [127]***
22)     Hey did you see the Moorish|guards|they|have protecting the vizier? [67]
23)     I wonder what those|curved|swords|would|be like in a fight? [59]
25)     They say the Moors can use magic|to|summon genies and wind and stuff. [69]
26)     They fight by summoning|genies.|What|do|they do huh? Rub a lamp? [64]
27)     And winds. They|can|summon|really|really|strong winds. [54]
28)     Oh sure. Better make sure the washer wench doesn't pick a fight with one on laundry day then. [93]***
31)     You read in the|papers|about|that|statue|weeping blood? [55]
32)     Yeah. My uncle|went|and|saw|it.|Said|it|cured his gout. [55]
33)     Hmm. I wonder if it|will|put|that|hospital out of business. [59]
35)     It'd be out of business already if Lord Belhaven wasn't paying for the whole thing himself. [91]***
38)     If you'll|follow|me|we|can|talk|about|the|details [49]

For the same fieldwidth, here's the analysis for 2.11 St. Lucia:

Spoiler

Ā 

Subtitles with One or Both Lines Longer than 42 Characters in Folder
<my dev machine's path>/[2.11]/stlucia/subtitles/

Can a too-long subtitle be fixed - and often readability improved - just by manually adjusting the
word distribution between both lines?

- YES. Valid locations for a linebreak (based on length alone) are shown with '|' replacing ' '.
- NO. The reason is:
        *** because total text exceeds (2 * 42).
        --- because there is no acceptable candidate space between words at which to split.

Other solutions: convert inline to srt; subdivide srt phrases; non-verbatim editing;
edit to affect word-wrap; subdivide .ogg/.wav files.

Inline subtitles in fm_root.subs, by line number:
6)      Great.|This|isn't|the|back|door|I|had|in|mind. [46]
7)      That guard is going to be a challenge. I|wonder if there is a less obvious way in? [82]
8)      Hmm... A good,|solid|push|might|tip|that|hammer over... [55]

Subtitles in player_briefing.srt, by srt phrase number:
1)      A few weeks ago, I started hearing talk|about a church called Saint Roderic's. [78]
2)      It's a small church, east of Mill Street, built back when that part of the city was flourishing. [96]***
3)      Now the area is one of the city's many slums, and the church ministers to the poor and destitute who live there. [112]***
4)      It's not the kind|of|place|I'd|normally|pay a visit to. [55]
5)      People have been claiming that the church has recently acquired some kind of holy relic, [88]***
6)      supposedly a shard|of|the|Master|Builder's True Hammer. [55]
7)      There is nothing like a shard of the True Hammer to part a righteous fool from his money... [91]***
9)      But according to what I overheard, when the relic was placed next to the church's statue of Saint Lucia, the statue started weeping blood. [138]***
10)     Word spread, and the faithful have|been|flocking to the church to see it. [73]
11)     Apparently, the archbishop himself plans to visit Saint Roderic's to witness the statue weeping and decide whether to confirm it as a miracle. [142]***
12)     In the meantime, the local priest is already proclaiming to one and all that the miracle is a sign from God. [108]***
13)     No surprise, the little church is suddenly overflowing with tithes and donations. [81]---
14)     The messenger I met in Royston Court two nights ago works for someone who is very interested in the situation. [110]***
15)     He has offered me|a|fair|sum|of|money|to|steal this relic. [58]
16)     Not only that, but he wants me to vandalize the weeping statue before the archbishop's visit. [93]***
17)     The messenger wouldn't|reveal|who|was|paying for the job. [57]
18)     My bet is some rival priest, jealous of the newfound wealth that Saint Roderic's is earning. [92]***
19)     I'm supposed|to|make|it|look|like|a|common burglary, [52]
20)     which means I can help myself to the tithe box and any other loot I can find lying around. [90]***
21)     This would be an easy job, except that some cathedral guards are already patrolling the grounds in preparation for the archbishop's visit. [138]***
22)     And the|Builders|don't|look|kindly|on|thieves. [46]
23)     The front gate is likely to be guarded, so I may have to look for a less obvious way in. [88]***
24)     And smashing the statue|without|drawing|attention to myself... [62]
26)     I don't get the other|half|of|money|until|the job is done, [58]

Ā 

Edited by Geep
  • Like 1
Link to comment
Share on other sites

On 3/19/2023 at 1:08 PM, stgatilov said:

I think part of the problem is that fonts are rendered into virtual 640:480 resolution, which is later resized to 16:9 or whatever aspect ratio you have.

Is aspect ratio taken into account, or is it simply stretched? If it is currently stretched, is it technically possible to implement aspect ratio correction on subtitles based on screen aspect ratio / resolution set?

Link to comment
Share on other sites

7 hours ago, datiswous said:

Is aspect ratio taken into account, or is it simply stretched? If it is currently stretched, is it technically possible to implement aspect ratio correction on subtitles based on screen aspect ratio / resolution set?

Everything is rendered to 640x 480, then stretched to whatever screen you have.

Giving some GUI element fixed real aspect ratio can only be achieved by computing inverse stretching at the moment when this element is rendered.
I think we added "forcescreenaspect" window flag for X-ray overlay, which is usually combined with "hcenter" flag, and it is implemented exactly like this.

Making font scale automatically is not a good idea, since it then you'll just get more variety with aspect ratios.

  • Like 1
Link to comment
Share on other sites

I'd like to get back to the request for the ability for the subtitler to extend individual subtitle durations, because that will be affecting how I create my subtitle content.

Maybe the previous ideas on this were a bit too code-intensive (e.g., for inline & srt lines in .subs, having an additional parameter; or doing calculations based on wpm).

Let me propose yet another, more limited/simple possibility... no new parameters, and no change to inline, but with srt, it would be OK for the last phrase to specify an endtime that exceeds the end of the clip, and the subtitle would be extended to that endtime.Ā  (For sanity, there can be a limit to that extension; I believe there's already a proposed global for that purpose.)

  • Like 1
Link to comment
Share on other sites

18 hours ago, Geep said:

Let me propose yet another, more limited/simple possibility... no new parameters, and no change to inline, but with srt, it would be OK for the last phrase to specify an endtime that exceeds the end of the clip, and the subtitle would be extended to that endtime.

That's exactly how the latest dev build should work.
With SRT, the sound is extended until the latest end time of all elements.

Is it not working as expected?

  • Like 2
Link to comment
Share on other sites

7 hours ago, stgatilov said:

That's exactly how the latest dev build should work.
With SRT, the sound is extended until the latest end time of all elements.

Is it not working as expected?

I guess I fell out of sync with where we were. I'll be looking forward to trying it out. šŸ˜€

  • Like 1
Link to comment
Share on other sites

Regarding fonts stretching.
Maybe I should try to implement width stretching in engine?

Suppose that someone specifies "fonts/carleton$aspect=16:9".
We break this into font + parameters, load the font, then do some postprocessing.
If aspect=A:B, then we scale down by X in (A/B) / (4/3) times, e.g. scale down in 4/3 times in case of aspect=16/9.

  • Like 1
Link to comment
Share on other sites

The bottom example would be preferable to me, provided the default fontsize overall (not just the width) was enlarged by around 15%, to make lower case read faster. This would make the string about the same width as the top example.
Ā 

  • Like 1
Link to comment
Share on other sites

For the record, there is much about these examples I dislike:

  • The subtitles here are way too lengthy and should be broken up into individual sentences.
  • Subtitle sentences should be always terminated, e.g., with periods. No terminator means the sentence continues in the next subtitle.
  • And I continue to make the case that these default panel fieldwidths are too large. As you know, I'd like half-screen, but could I suppose, live with up to 2/3rds. Having a less-wide default means that the player could then make it wider with a new future Setting that scales up (or down) fontsize too. So if enlarged, better support for low-vision users, and if shrunken, less obstrusive for eagle-eye'd English-as-second-language users.
  • Like 1
Link to comment
Share on other sites

Currently the fieldwidths are a fixed proportion of the screen width (e.g., 90%). In the example images, there is the suggestion that the fieldwidth would be adjusted for aspect ratio instead. So a fieldwidth of 90% for a 4:3 screen becomes, for a 16:9 screen (with a 0.75 reduction) a fieldwidth of 67.5%. That is, about 2/3rds of the screen.

  • Like 1
Link to comment
Share on other sites

I have added support for aspect ratio correction in font: 6283

I'm not very keen to introduce aspect-dependent GUI layout without major need.
Unless anyone is interested in 4:3 and 5:4 aspects, better hardcode 16:9 for now.

Also I noticed a defect in fonts/stone font: some of its letters overflow their rectangle in font atlas, so neighboring letters render with a thin white line on the left. It is not nice but not critical either.


It would be great if someone proposes several layouts & fonts for subtitles, so that people could choose which one to use.
The requirements from me are:

  1. The amount of text must be a bit larger than what a subtitle currently can hold.
  2. Don't obstruct weapon/inventory icons and "you acquired compass" messages on default GUI size.
  3. Preferably readable font with 16:9 aspect correction, large enough to be readable when TDM takes half of monitor size.

Ā 

P.S. Did we agree on the syntax for extending duration of inline subtitles?...

  • Like 1
Link to comment
Share on other sites

7 hours ago, stgatilov said:

It would be great if someone proposes several layouts & fonts for subtitles, so that people could choose which one to use.

Rather than bundled subtitling themes, I'd like to see more flexible offerings, namely two new Settings for

  • Subtitle Font Size
  • Subtitle Font

In the .gui, Subtitle Font size would directly tell the .gui how to scale the font. Together, the two settings could allow the .gui to intelligently adjust the backing fields; some .gui code experimentation would be needed.

7 hours ago, stgatilov said:

Did we agree on the syntax for extending duration of inline subtitles?...

How about this? This optional parameter, in units of seconds, should be the last one in a line, preceded by a space. Probably doesn't need enclosure in double quotes, but that would be OK if you find it makes parsing easier.

Specifying an amount of extra time, rather than the amount of total time, seems safer to me. An ideal format would be 1 digit before the decimal point, up to 3 after it. So typical: 0.1, 0.25, 0.125

  • Like 1
Link to comment
Share on other sites

45 minutes ago, Geep said:

Rather than bundled subtitling themes, I'd like to see more flexible offerings, namely two new Settings for

  • Subtitle Font Size
  • Subtitle Font

In the .gui, Subtitle Font size would directly tell the .gui how to scale the font. Together, the two settings could allow the .gui to intelligently adjust the backing fields; some .gui code experimentation would be needed

I'm against offering these setting in the menu, because it would result in subtitles look like trash for all players who have changed them from defaults.
Something like cvars for experiments --- yeah, why not.

Quote

How about this? This optional parameter, in units of seconds, should be the last one in a line, preceded by a space. Probably doesn't need enclosure in double quotes, but that would be OK if you find it makes parsing easier.

I think it is OK, but this optional parameter must be preceded by keyword, like durationExtend.
Otherwise you'll block possibility for adding other additional settings in the future.

  • Like 1
Link to comment
Share on other sites

22 minutes ago, stgatilov said:

I think it is OK, but this optional parameter must be preceded by keyword, like durationExtend.
Otherwise you'll block possibility for adding other additional settings in the future.

True. Or shorten it to -x 0.123, where -x stands for Xtra time.

26 minutes ago, stgatilov said:

I'm against offering these setting in the menu, because it would result in subtitles look like trash for all players who have changed them from defaults.

I guess you mean that some scale factors cause poor font rasterization.

Ā 

28 minutes ago, stgatilov said:

Something like cvars for experiments --- yeah, why not.

Let's start there. šŸ˜€

  • Like 1
Link to comment
Share on other sites

Hi, I'm not completelly following everything what is being said in this thread, but I wonder if big changes are being applied that make it necessary to change subtitles later? I have been creating subtitles for existing missions lately. Is it possible that these files have to be modified later? If so, I stop now doing that until changes are made.

Link to comment
Share on other sites

No consensus has been reached on changes.

Certainly I have a subtitle style I prefer, and applying that style to briefings and other story subtitles would no doubt mean changes for some existing subtitles. This would not be much work for inline subtitles. Breaking up over-long srt phrases would take more work.

You could pause or slow-walk subtitling if you think warranted.

  • Like 1
Link to comment
Share on other sites

@datiswous

As I can tell, @stgatilov has been careful not to break backward compatibility with the 2.10 \ 2.11 subtitle implementations so I doubt you need to worry about wasting efforts.

At the very least having the subtitles in "some text format" would allow us to use automated text conversion tools to update them if needed.

  • Like 2

Please visit TDM's IndieDB site and help promote the mod:

Ā 

http://www.indiedb.com/mods/the-dark-mod

Ā 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I have argued that the 2.10/2.11 implementations have field widths that are way too wide, unpopular with most subtitling orgs, and conflicting with TDM's corner inventory and weapon icons. So breaking backward compatibility now would be a good thing, before it's too late and too many FMs are subtitled targeting wide fields.

But I can only suggest, and continue to make my bark subtitles fit in a less-wide field, taking into account sentence and phrasing breaks.

Future automated text conversion update tools could be helpful.

  • Like 2
Link to comment
Share on other sites

10 hours ago, datiswous said:

Hi, I'm not completelly following everything what is being said in this thread, but I wonder if big changes are being applied that make it necessary to change subtitles later?

I'm pretty sure we will change the formatting/layout soon.

Existing messages would fit the new limits (they would be a bit larger), hopefully without exceptions.
But the particular look will change, that's for sure.

Your question is exactly why we should choose the new format as good as possible and fix it in stone afterwards.

  • Like 2
Link to comment
Share on other sites

13 minutes ago, stgatilov said:

Existing messages would fit the new limits (they would be a bit larger), hopefully without exceptions.

@stgatilov, this is precisely where our views diverge. We're both interested in a narrower, aspect-corrected font, but for different reasons: You're looking to increase the amount of text than can be held... I'm looking to make the backing fieldwidth less wide, and think there's already too much text per subtitle.

A possible compromise would be to make the fieldwidth 2/3rds of the screen. This would maintain the current amount of text, given the current font but now aspect-corrected. Probably more text (ugh) with the Stone font, aspect-corrected.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...