-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtitle system for streaming audo/video #12224
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll find below a cursory review. You might want to check the project coding style and the lint bot result to address some of the issues.
I'd really like Dolphin to have a translation/subtitle system/API. However, I'm unsure which form it should take and if your current proposal is the best way to implement one. As you said, you're hooking file loads and it won't work if the file is used later.
A simple subtitle system to allow for translating games without any riivolution patches or romhacking.
I can understand the rational as it can make translation easier. However, this approach prevents the translation project from being used on real hardware (which is kinda sad for a translation project).
Some games might bundle several texts, voices, videos into a single file. I've rarely seen games using one file (audio, video or text) for a single message which makes your approach very situational.
Other ways that might be used to extract texts or its address/properties of Dolphin (from an external process):
- Using Dolphin Memory Engine
- Using File/IO logs and checking Dolphin logs
- Using log breakpoints and checking Dolphin logs
Possible alternatives to extract texts from Dolphin (to be implemented):
- Custom HLE hooks
- Custom breakpoint log messages (to fetch text from specific address/register)
- Custom File/IO/DVD hooks
For reference, common methods to translate games:
- Create a game translation patch, using Wiimm ISO Patcher (based on WIT) and/or Riivolution.
- IIRC, libretro can (try to) translate using a screenshot, send it to an OCR and send its results to a translator.
- Text extracting tool can be used (Textractor, for instance) and its results can be sent to a translator.
This little fork came as a result of my translation effort of R79JAF, as a companion to riivolution patch with text and textures. In example I provided at start I do not use subtitles, as I am in process of patching all on-screen text. Subtitles on actual hardware are, obviously, out of scope. |
I've been waiting for something like this. Great job! |
TLDR: Yes, but... There was a discuss about something like that on modding Discord. Idea being that if we can't really make emulated (or real) Wii to play super duper 4k video, we can just make Dolphin play it. There are some issues to be resolved to get such system to work
Vdeo: However, there are more complicated video playbacks. Some are looped, some are mixed into gameplay scene. Sound: |
A simple subtitle system to allow for translating games without any riivolution patches or romhacking.
It started as my pet project, R79JAF translation, to allow translation of voice files that had no accompanying on-screen text.
After boasting about it on discord some translators expressed interest in it so I upgraded it to be more universal.
Target games are ones with a lot of audio/video files streamed on-demand from disc. It won't work on pre-fetched stuff. So stuff like "visual novels" would be prime target.
Basically, it takes json file like this
And does stuff like this:
Under the hood it works same as FileMonitor log, Simple hook in DVDThread and lookup for filename in dictionary.
As such it can be used for any file read from disc.
Subtitles are (re)loaded when game starts.
Display is done wtih ImGui through OSD, which I upgraded to handle multiple "zones".
Fancy functions:
Possible issues: