Add remastered OGV cutscene playback with MIDI music sync#587
Open
elliotttate wants to merge 5 commits intoluciusDXL:masterfrom
Open
Add remastered OGV cutscene playback with MIDI music sync#587elliotttate wants to merge 5 commits intoluciusDXL:masterfrom
elliotttate wants to merge 5 commits intoluciusDXL:masterfrom
Conversation
Play Nightdive remaster's Ogg Theora video cutscenes when available, falling back to original LFD/FILM cutscenes otherwise. Uses libtheora for video decoding, libvorbis for audio, and a YUV->RGB GPU shader for rendering. Includes SRT subtitle support, auto-detection of remaster install paths, and a settings toggle. Gated behind ENABLE_OGV_CUTSCENES compile flag.
Replace the hardcoded cue timer with a pre-scan approach that extracts music cue points from the original FILM cutscene chain. Each FILM's CUST actor is loaded and ticked to capture its cue value and timestamp, then all times are scaled to match the OGV video duration. This ensures MIDI music transitions fire at the correct visual moments for all cutscenes, not just the intro.
ifeldshteyn
reviewed
Mar 5, 2026
The remaster's actual timing mechanism is a per-scene DCSS text script
that fires seq/cue/musicvol directives against the video's clock. Our
previous approach of pre-scanning LFD FILMs and scaling to OGV duration
was approximate and fragile. This switches to a real DCSS parser that
matches the remaster's format byte-for-byte (including its parse
quirks), and dispatches cues against the video's intrinsic clock for
sub-frame accuracy.
Code:
- New dcssParser.{h,cpp}: tolerant SRT-like parser, sorted-on-load,
'#'/'//' comments. All 13 stock .dcss files validated.
- cutscene.cpp: dropped FILM pre-scan. OGV path now reads DCSS and
dispatches via getVideoTime() for hitch-proof sync. musicvol now
scales 100 = base (matches CUTSCENE.LST convention and the LFD
path); previous /127 made every cutscene ~20% quiet.
- remasterCutscenes: key lookups on scene->scene (matches remaster),
added getDcssPath() with auto-detection by walking up from movies/.
Locale-aware OGV and SRT lookup (logo_de.ogv, arcfly_de.srt, ...).
- ogvPlayer: new getVideoTime() returning the intrinsic video clock.
Docs in Documentation/markdown/remaster-cutscenes/:
README, architecture, dcss-format, modding-guide, video-conversion
(MP4 -> OGV pipeline tested end-to-end with a verified ffmpeg
one-liner), troubleshooting.
Measured timing drift: 0-33ms (<=1 frame at 30fps) over 1:53 of
playback, bounded, no accumulation.
Master's b557d7c renamed FileUtil::directoryExits -> directoryExists (fixing the typo). Update the remaster cutscene path resolution to match. No behavior change.
Author
Update: DCSS-driven cutscenes + hardening + docsSignificant follow-up work pushed to this branch: What changed
New documentationSix markdown files under
Verification
Tracing flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ENABLE_OGV_CUTSCENES(CMake) / preprocessor define so it has zero impact when disabledDetails
ogvPlayer.cpp/h(Theora/Vorbis decoding + OpenGL YUV rendering),remasterCutscenes.cpp/h(OGV path resolution from remaster install),srtParser.cpp/h(subtitle loading)cutscene.cpp(OGV playback path + FILM-driven cue scheduling),audioSystem(PCM mixing for OGV audio),renderBackend(fullscreen quad for video frames),settings(remaster cutscene toggle),frontEndUi(settings checkbox)theoradec,ogg,vorbisdependencies behind the option flagTest plan
ENABLE_OGV_CUTSCENES— should compile cleanly with no OGV code included