Author Topic: Adding subtitles to FS2 cutscenes  (Read 621 times)

0 Members and 1 Guest are viewing this topic.

Adding subtitles to FS2 cutscenes
Related threads:

Questions about the Translation features
Unicode text support

I'm modifying old Japanese localization mod so that it can be used with FSO.

Most errors have been ironed out, and now I'm thinking about adding subtitles to cutscene movies.
(This was never a problem for old Japanese mod, because it can not play movie files.)

I believe I understand how SRT subtitles work (at least it is working on MPC-HC).
I'd like to know where I should place these SRT files.

I'm using latest Nightly and it always gives me the same error when I enter the cutscene sequence (such as bastion.mve).


I have added $Movie subtitle font: to mod.tbm and a truetype font but it gave me almost the same error.

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
The font name must be a name of a font entry specified in fonts.tbl and not a simple TTF file name.

FSO currently only supports subtitles that are embedded in the movie file. In my tests I did that with FFmpeg. Generally, the subtitle code of FSO is not very well tested since I did not have much data to test it with when I wrote that code originally.

 

Offline Novachen

  • 28
  • The one and only Capella supernova.
Re: Adding subtitles to FS2 cutscenes
I actually recommend to create own movie files with an embedded graphic subtitle instead.

Simply because it allows you to design the subtitle exactly like you wish it should appear, you can control the position and their size and you can add subtitle effects to it, if you wish.

And because we are talking about the FS2 cutscenes in 480p here, they will not have a big download size if you reencode them into MP4 with CRF10 or 12 or something like that.
Female FS2 pilot since 1999.

German Translations created by me:
Between the Ashes: Slaves of Chaos, FreeSpace Port, The Destiny of Peace, Silent Threat: Reborn, Awakenings (in development)

Upgrades and Bugfixes:
FSPort Mission Upgrade, Luyten Civil War, Into the Halls of Valhalla, VeniceMirror

Other projects:
Out of the Shadow: Nova Safiya Edition (Remake of the Out of the Shadow campaign, in development)



If you want to know, what my nickname means, -chen is a german diminutive term, so you can translate Novachen as something like Little Nova or Novalet.
Even my original meaning of this name is more like "Sweet pretty deadly (Super)Nova" ;).

 
Re: Adding subtitles to FS2 cutscenes
The font name must be a name of a font entry specified in fonts.tbl and not a simple TTF file name.

Thank you. I have added +Name: font01 to fonts.tbl and $Movie subtitle font: font01 to mod.tbm and the error message has disappeared.

I actually recommend to create own movie files with an embedded graphic subtitle instead.

Simply because it allows you to design the subtitle exactly like you wish it should appear, you can control the position and their size and you can add subtitle effects to it, if you wish.

And because we are talking about the FS2 cutscenes in 480p here, they will not have a big download size if you reencode them into MP4 with CRF10 or 12 or something like that.

Actually this is much easier for me because a few years ago I made videos like this:

However, you need to create movie files at higher resolution than 480p. Because video cutscenes will be stretched out in the game and subtitles will get blurry.

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
If you give me a movie file which uses subtitles with some more advanced features I can take a look at how those features could be implemented. Alternatively, if you have a standalone SRT file I could try adding code for reading that with FFmpeg.

The bottom line is this: If you give me more subtitle data I may be able to implement the missing features :p

 
Re: Adding subtitles to FS2 cutscenes
If you give me a movie file which uses subtitles with some more advanced features I can take a look at how those features could be implemented. Alternatively, if you have a standalone SRT file I could try adding code for reading that with FFmpeg.

The bottom line is this: If you give me more subtitle data I may be able to implement the missing features :p

Do you need sample SRT files? I made a SRT file for Diaspora mission 2 briefing when I downloaded Subtitle Edit.

It is supposed to look like this:

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
Thank you, I'll check if ffmpeg can read SRT without a movie file.

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
I wrote some code that appears to be working, here are some test builds: http://swc.fs2downloads.com/builds/test/externalSubtitles/

The way this works is that you place your .srt file in the same directory as the movie file and name it <movie name>-<extension>.srt where "<extension>" is the value of +Extension: given for that language in strings.tbl. I did not have the unicode mode set up for Diaspora so I could not see the proper text but it appeared to be changing in the right intervals so I guess that it is working.

 
Re: Adding subtitles to FS2 cutscenes
I wrote some code that appears to be working, here are some test builds: http://swc.fs2downloads.com/builds/test/externalSubtitles/

It's working! Thank you!


There's still one more thing I'd like to ask you. Can you add text shadows to subtitles?
Sometimes "white text on white background" is hard to read.

I did not have the unicode mode set up for Diaspora so I could not see the proper text but it appeared to be changing in the right intervals so I guess that it is working.

Sorry for inconvenience. I have attached Japanese subtitle files for FS2 intro and Bosch monologue 1.

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
It's working! Thank you!
Great! Thank you for testing.

There's still one more thing I'd like to ask you. Can you add text shadows to subtitles?
Sometimes "white text on white background" is hard to read.
Unfortunately, that effect is actually surprisingly hard to implement so for the moment that effect is nor supported by FSO, sorry...

 
Re: Adding subtitles to FS2 cutscenes
There's still one more thing I'd like to ask you. Can you add text shadows to subtitles?
Sometimes "white text on white background" is hard to read.
Unfortunately, that effect is actually surprisingly hard to implement so for the moment that effect is nor supported by FSO, sorry...

Don't worry. Since FreeSpace2 is a space sim there won't be too many white background. :lol:
Fortunately the game allows me to change font size via fonts.tbl quite easily. I guess bigger fonts will make it easier to read in most cases.

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
I am working on some improvements to the font rendering which may allow adding outlines to fonts with a different color than the inside of the font but it will take a while until those changes are stable.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Adding subtitles to FS2 cutscenes
Cool! When we can at least see it committed to main code?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
See what committed? I already opened a PR for the subtitle code which should be merged soon.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Adding subtitles to FS2 cutscenes
I actually recommend to create own movie files with an embedded graphic subtitle instead.

I'd recommend against that. Using subtitle files makes it very easy to switch languages and since they are tiny they can all go in a VP file and be forgotten about. I dislike the idea of having separate mods based on language. It just causes confusion and bloat. Not to mention serious problems if a mod ever decides to change one of their cutscenes.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Novachen

  • 28
  • The one and only Capella supernova.
Re: Adding subtitles to FS2 cutscenes
If there were support for a graphic layer, then i would agree, yes. But in many cases text subtitles simply limits your possibilites too much. For example, you can only translate the voice over, but not texts, that appears at the same time.

It has a reason why i have decided myself for own cutscenes and against the use of SRTs. So it was my recommendation based on my experiences i have collected and based on my demands i have for atleast my own translation packages. And because you will likely have to download specific languages as an own mod anyway (because it could be hard to implement spelling updates etc. otherwise), you have seperate downloads anyway.

If the SRT support is enough for Nikogori and his translation attempt, fine. It is his project after all, with his own ideas and visions. Every one has different demands on how a translation should appear. For me SRT simply are too restictive. That's everything :)
« Last Edit: June 09, 2018, 11:00:49 am by Novachen »
Female FS2 pilot since 1999.

German Translations created by me:
Between the Ashes: Slaves of Chaos, FreeSpace Port, The Destiny of Peace, Silent Threat: Reborn, Awakenings (in development)

Upgrades and Bugfixes:
FSPort Mission Upgrade, Luyten Civil War, Into the Halls of Valhalla, VeniceMirror

Other projects:
Out of the Shadow: Nova Safiya Edition (Remake of the Out of the Shadow campaign, in development)



If you want to know, what my nickname means, -chen is a german diminutive term, so you can translate Novachen as something like Little Nova or Novalet.
Even my original meaning of this name is more like "Sweet pretty deadly (Super)Nova" ;).

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Adding subtitles to FS2 cutscenes
If you have the ressources to rerender your cutscenes every time someone makes a translation, that's cool and more power to you.
But I would assume that, for the majority of people, providing subtitle files is the easiest and fastest way to do what they want or need to do.

Also, providing a new localization as a bunch of text files is still easier and less bandwidth-intensive than cutscenes.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 
Re: Adding subtitles to FS2 cutscenes
I prefer SRT subtitles because they are far easier to make small update. I remember the moment when I uploaded a video with embedded subtitles that took me a couple of months to make and suddenly noticed a typo as I was watching it...

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: Adding subtitles to FS2 cutscenes
SRT subtitles is a must.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline m!m

  • 210
Re: Adding subtitles to FS2 cutscenes
SRT support has been merged into master already and should appear in the next nightly build. I am working on implementing ASS support but that will take some additional time since the format is more complicated than SRT.