Adding subtitles to audio only games (proposed method)

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
arablizzard2413
Posts: 21
Joined: Sun Mar 19, 2006 9:39 am

Adding subtitles to audio only games (proposed method)

Post by arablizzard2413 »

I have a friend who recently lost his hearing and enjoys playing games in scummvm, but since he lost his hearing he can't really play any games that don't have subtitles (the ones I know off the top of my head are The 7th Guest and King's Quest 7 once it's supported, but I'm sure there are others).

I had an idea of how to add subtitles to games that didn't originally have them in a system that's flexible enough that people could make their own subtitles (maybe even for translations?).
1) The game engine in scummvm reports the name of the audio file it's about to play if the subtitles option is turned on

2) A separate file in the scummvm directory (for example t7g.sub) contains a list of entries with the audio file names, x,y position, timestamps, and the subtitle text.

3) Subtitle text is printed on the screen at x,y (in whatever native resolution the game is in) as the audio file plays with cues from the timestamps.

So the .sub file would look something like:

Code: Select all

# Subtitles file for The 7th Guest
gameid=t7g
language=english

# begin list of audio files
file=WHTEVR.EXT
# x,y @ hour:minute:second:milisecond
100,48@00:00:01:45="This is some text"
100,48@00:00:05:18="This is more text"

file=ANOTHR.EXT
60,80@00:00:00:01="you get the point"
User avatar
sanguinehearts
Posts: 378
Joined: Mon Oct 31, 2005 12:42 am
Location: Hampshire, United Kingdom

Post by sanguinehearts »

Great idea!
Keep up the good work :)
User avatar
BeleG
Posts: 42
Joined: Mon Feb 16, 2009 12:31 pm

Post by BeleG »

This would be an amazing feature, if it could be done of course. It would open this good game (and eventually also other games) to many people who can't understand spoken English, but can read it. I'd be very interested in even making a translation to Spanish of The 7th Guest using this system, which is, at the moment, something impossible.
User avatar
topolinik
Posts: 86
Joined: Tue Mar 27, 2007 9:08 am
Location: Italy

Post by topolinik »

Did some developer stumbled into this thread?

I like this proposal, the good side of the idea is it doesn't require modifications to the original files, only adding a new text resource.
The other way should be re-encoding the video files provided with the game adding subtitles (this involves overall quality loss), but that way scummvm should be instructed to decode different video sources.

C'mon, guys, what do you think? Is there any legal/technical issue with this?
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

topolinik wrote: [...]Is there any [...]technical issue with this?
I think you slightly underestimate how much work this will turn out to be.

Sound is handled differently by differed game engines in diffident situations.
In many cases the sounds are not distinguishable files but big archives with a number index. (like the .sou files of LA games)
In other cases the sound is included (interleaved with) the video (like the Broken Sword .smk movies).

And how to make sure the subtitles are not covering up some essential part of the screen? The default bottom-centred position may be good for one game scene but be obstructive for another.
You would need to be able to specify the text offset in the subtitle file too.

Also, the subtitles need be interruptible (for when the user pauses the game) so displaying the text is not just touch-and-go. You need some feedback mechanism and need to specify the duration of everything.

Also if someone would set out to make this it would only be worth it if full Unicode is supported for all the non-Latin alphabet languages and right-to-left writing for our middle-eastern friends.

Also, while there are good tools around to help you roll a soft-sub for an avi-movie or DVD, no such tools would be helpful for subbing some obscure game-files.
Actually making the subtitle textfiles with a texteditor and trial-and-error will be very VERY tedious work.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

It depends on each engine, so it's best for the engine authors to look. I propose that you email to scummvm-devel and repeat list of the games which need this feature.

We already implemented something similar for Broken Sword 1 cutscenes, i.e. subtitles are shown in dependence on the cutscene frame number. I see no problem from technical point of view, granting that there is at least some code which displays text.


Eugene
User avatar
BeleG
Posts: 42
Joined: Mon Feb 16, 2009 12:31 pm

Post by BeleG »

I have submitted a list of supported games that would require such a feature at scummvm-devel. I hope I used it right, as it's been the first time I write to a mailing list.

I'm already glad you even take it into consideration, and I hope it could some time become a reality. :)
Eerious
Posts: 1
Joined: Sat Apr 19, 2014 4:03 pm

How to enable subtitles in King's Quest 7

Post by Eerious »

Since this topic is the first hit on Google by request "King's Quest 7 subtitles", I decided to post my findings here:

It is possible to enable subtitles in KQ7, if you're OK with disabling of voice narration.

Edit RESOURCE.CFG file with notepad and add the following line:

Code: Select all

audioSize = 0K
(that is zero-K, not Okay)

Then start a new game.

It looks like the choice between voice and subtitles is done when new game starts, because changing this config option and loading saved game doesn't affect the subtitles presence.
User avatar
legluondunet
Posts: 51
Joined: Fri Jan 30, 2015 9:24 am

Post by legluondunet »

is there any news about this feature?
User avatar
m_kiewitz
ScummVM Developer
Posts: 157
Joined: Tue Dec 01, 2009 10:09 am
Location: Daventry

Post by m_kiewitz »

I just added a bit of code into ScummVM, so that King's Quest 7 can be switched to audio + subtitles mode directly.

You can patch your own game to make that work with the original interpreter (SCI32 support in ScummVM is unstable at the moment). You will need a bit of technical knowledge. This is done by:

- Download a daily build of ScummVM.
- Add King's Quest 7
- Start King's Quest 7 and enter debugger by pressing Ctrl-Shift-D
- enter command "diskdump script 10"
- this should save the script into the ScummVM directory
- now copy this script file into your King's Quest 7 directory
- use a hex-editor to search for the following bytes: 35 02 a1 5a
- change 35 02 into 35 03

That should give you audio + subtitles at the same time without having to save/restore etc.

Works for at least English 1.51, German 1.51, English 2.00b.
User avatar
legluondunet
Posts: 51
Joined: Fri Jan 30, 2015 9:24 am

Post by legluondunet »

and for The 7th Guest? Is it possible now to add subtitles?
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

legluondunet wrote:and for The 7th Guest? Is it possible now to add subtitles?
Not yet. Completely different game, which requires a completely different approach
Post Reply