ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.58k stars 359 forks source link

Subtitles for In-game Videos #8536

Open sytnik-aa opened 3 months ago

sytnik-aa commented 3 months ago

Preliminary checks

Describe the problem requiring a solution

I'm sorry, I've search by "subtitle" and I didn't found anything. I also checked game's options and configuration file. Is there an option to display subtitles for in-game videos? Can they be added manually?

Describe the possible solution

I'd like to see a configuration option to enable subtitles display during in-game videos (intros and campaign intros).

Additional info

Video transcripts are available, for example, here: http://www.heroesofmightandmagic.com/heroes2/storyline.shtml and here: http://www.heroesofmightandmagic.com/heroes2/pol_storyline.shtml These particular transcripts are copyrighted , but 1) I can do the same from scratch 2) I can contact the author and ask his permission to use his transcript.

zenseii commented 3 months ago

Hi, @sytnik-aa. We have already laid some of the necessary groundwork needed for subtitles some time ago thanks to @Districh-ru.

Regarding the actual subtitles the Heroes 2 Gold edition from GOG comes with transcripts for the videos in form of text files so one solution to avoid any copyright issues would be to load the subtitles from there. I'm not sure if they are translated according to the language chosen.

Adding subtitles would also make it possible to have Closed Captions for people with deafness or hearing loss.

sytnik-aa commented 3 months ago

Thank you for the responce @zenseii I have a GOG version, but I actually never used it thanks to this project :) In any case, if there is a need for any input on the topic from me, I will glady do what I can. Thanks!

ihhub commented 3 months ago

The reason why subtitles aren't implemented is due to the copyright wall. We simply cannot use texts as a part of the engine. We can load text files which are a part of GOG but not to download them from other unofficial sources.

sytnik-aa commented 3 months ago

Sorry, I launched the GOG version, but I don't see any subtitles there. Or should I install something they call an "HoMM 2 Gold (optional Windows version)"?

UPD. Sorry, I've found files named "H2CAMP.TXT" and "POLCAMP.TXT", is that it?

UPD2. I can't imagine how these files can be used as source material for the subtitles...

sytnik-aa commented 2 months ago

Hi, guys!

Please review this. It's crude, it's just a concept. I have a spreadsheet https://docs.google.com/spreadsheets/d/1rPWtmX9igSHx3xF8e1HykP1pxqBxlcvRnskd-8r2RIM/edit#gid=0 that contant a mapping that allows to generate subtitles for one of the videos.

It doesn't include any copyrighted content, it only refers to certain files and positions in those files. The user must have the files as usual. I believe it can be used to generate the subtitles during the fheroes2 installation or on the fly.

It can be turned into a configuration file and included in the source so anyone who is better at making subtitles than me can participate.

What do think? Do you want me to add other videos into the spreadsheet, or any other format you find appropriate?

Thank you!

zenseii commented 2 months ago

Hi, @sytnik-aa. Thank you very much for making this spreadsheet. It will become useful. What we also need to check is whether the Heroes 2 Gold versions of other languages that GOG supplies have these subtitles in a translated form according to the language downloaded (French, Polish, German). Checking this is a matter of downloading and installing them.

sytnik-aa commented 2 months ago

I see that only the French version has these files (and they are the same as in the English version), but the German and the Polish ones don't. I'll check it more thoroughly later. Thanks!

ihhub commented 2 months ago

Marking this issue for 1.2 release as we don't have a proper solution and the release will contain this feature for the new campaign. As for the old campaigns we must follow strict copyright rules and not to break them. If anyone offer a solution to solve this then we can proceed with this.

sytnik-aa commented 2 months ago

I'm sorry, could you be more specific please about what copyright issues my solution has? It's just a mapping of existing assets.

You guys already providing modified visual assests and translations that are all derivatives from the original copyrighted content.

I just want to understand the boundaries you've set. Thanks!

ihhub commented 2 months ago

@sytnik-aa , Ubisoft owns the game and all copyright for it. It means that fheroes2 engine cannot be shipped with any files that are a part of game's resources, not is able to download any files from non-official resources. Game texts cannot be copied from text files. What fheroes2 can do is to read these files during runtime.

sytnik-aa commented 2 months ago

Yes, and that's what my solution is about.

The mapping literally says that during a playback of a video file (column A) at a moment (column C) a text from a source file (column E) that starts at line # (column F) offset (column G) and ends at line # (column H) offset (column I) must be displayed and at a moment (column D) it must be hidden.

Of course, in would be much easier to implement if this mapping is used to just generate a banch of .srt (or whatever subtites format you prefer) files, but in my opinion it can be done during runtime as well.

Thank you!