Page 1 of 1

Video subtitles editing (P4G PC)

Posted: Fri Jul 03, 2020 12:24 pm
by Sakimotor
Hello. I am currently translating the PC version of Persona 4 Golden along with a group of people. So far we have found most of text and sprites we needed to edit. We have no luck with the subtitles though.

I tried checking the .USM files with ffmpeg but it finds no subtitle track. I also have found no files that may look like subtitles in the game's files.

Do you guys know how the game handles subtitles ? Thanks in advance !

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 12:21 am
by Crowpocalypse
The cutscenes have their subs stored in the exe. Open the exe up in a hex editor and use a search function to find all of them.

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 12:22 am
by Alan3D
What language are you translating to?

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 6:10 am
by Sakimotor
Alan3D wrote: Sun Jul 05, 2020 12:22 am What language are you translating to?
French.

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 6:49 am
by Sakimotor
It looks like the subtitles are indeed inside the .exe file. This means that I would have to find a way of modifying the .exe's length without rendering it unusable if I wanted to sub the game properly. Thanks for the help !

EDIT : Actually, the game's default font doesn't even support french characters, the real fun begins now I guess

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 8:04 am
by Nulla
Sakimotor wrote: Sun Jul 05, 2020 6:49 am It looks like the subtitles are indeed inside the .exe file. This means that I would have to find a way of modifying the .exe's length without rendering it unusable if I wanted to sub the game properly. Thanks for the help !
Have you actually found the subtitles' text in the .exe? I've looked into it with HxD but I can't seem to find anything useful.

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 11:15 am
by Sakimotor
Nulla wrote: Sun Jul 05, 2020 8:04 am
Sakimotor wrote: Sun Jul 05, 2020 6:49 am It looks like the subtitles are indeed inside the .exe file. This means that I would have to find a way of modifying the .exe's length without rendering it unusable if I wanted to sub the game properly. Thanks for the help !
Have you actually found the subtitles' text in the .exe? I've looked into it with HxD but I can't seem to find anything useful.
Yeah, the subtitle strings start at 0x5C2B78

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 11:30 am
by Nulla
Sakimotor wrote: Sun Jul 05, 2020 11:15 am
Nulla wrote: Sun Jul 05, 2020 8:04 am
Sakimotor wrote: Sun Jul 05, 2020 6:49 am It looks like the subtitles are indeed inside the .exe file. This means that I would have to find a way of modifying the .exe's length without rendering it unusable if I wanted to sub the game properly. Thanks for the help !
Have you actually found the subtitles' text in the .exe? I've looked into it with HxD but I can't seem to find anything useful.
Yeah, the subtitle strings start at 0x5C2B78
I swear I looked up for "Welcome" in the .exe and it found nothing, no idea why, thank you so much. Have you found a way to edit them without messing up the .exe yet?

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 11:40 am
by Sakimotor
Nulla wrote: Sun Jul 05, 2020 11:30 am
Sakimotor wrote: Sun Jul 05, 2020 11:15 am
Nulla wrote: Sun Jul 05, 2020 8:04 am

Have you actually found the subtitles' text in the .exe? I've looked into it with HxD but I can't seem to find anything useful.
Yeah, the subtitle strings start at 0x5C2B78
I swear I looked up for "Welcome" in the .exe and it found nothing, no idea why, thank you so much. Have you found a way to edit them without messing up the .exe yet?
Well, you could edit the strings, but you can only do so as long as there are less or as much strings as before, so this is the best I've got (I used Biénvenue instead of "Bienvenue", just to show that french characters don't work) Image

I'm sure there is a way of increasing the .exe's size without corrupting it, by modifying the length that's precised in the header for example, but I know nothing about where a .exe's header is located or how it works, so...

Oh, and, most importantly, I don't know how the game handles the separation between sentences or how it knows which subtitle belongs to which video, so I guess that is also to be found and modified... I will probably end up editing the videos themselves by hardcoding some subtitles to them, rather than struggling with all these issues

Re: Video subtitles editing (P4G PC)

Posted: Sun Jul 05, 2020 11:45 am
by Nulla
Sakimotor wrote: Sun Jul 05, 2020 11:40 am
Nulla wrote: Sun Jul 05, 2020 11:30 am
Sakimotor wrote: Sun Jul 05, 2020 11:15 am

Yeah, the subtitle strings start at 0x5C2B78
I swear I looked up for "Welcome" in the .exe and it found nothing, no idea why, thank you so much. Have you found a way to edit them without messing up the .exe yet?
Well, you could edit the strings, but you can only do so as long as there are less or as much strings as before, so this is the best I've got (I used Biénvenue instead of "Bienvenue", just to show that french characters don't work) Image

I'm sure there is a way of increasing the .exe's size without corrupting it, by modifying the length that's precised in the header for example, but I know nothing about where a .exe's header is located or how it works, so...
I know a team working on the spanish translation posted an image of the subtitles with accented characters, so there must be a way to do so. I'll look into it.