fix(h3): no desfasar el soundtrack cuando el plan empieza a mitad de canción - #19
Merged
Merged
Conversation
…canción El concat final de H3 Legacy/secuencial remuxeaba la canción desde 0:00 aunque el plan saltara la intro. Los slices de drive ya partían de audio_origin_sec, así que los labios iban al verso y el MP4 final sonaba el instrumental. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
PR Review — Loreframe StudioRisk: low Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
…anagement-7cb7 Co-authored-by: THEINAOG <IAnMove@users.noreply.github.com>
IAnMove
marked this pull request as ready for review
August 29, 2026 12:15
cursor Bot
pushed a commit
that referenced
this pull request
Aug 29, 2026
#19 already offset the final remux from audio_origin_sec. This branch still walks a single elapsed_frames cursor so shot 2+ slices the song after prior segments. Keep both tests after the conflict in test_director_minimax_h3.py. Co-authored-by: THEINAOG <IAnMove@users.noreply.github.com>
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.


El concat final de
_run_minimax_h3_story_video(H3 Legacy / proyectos H3 sin registry) remuxeaba la canción o el diálogo desde 0:00 aunque el plan saltara la intro.Los slices de drive por plano ya partían de
audio_origin_sec(_audio_timeline_start). El MP4 final no pasaba ese offset aconcatenate_multi_clip_videos. El rejoin y el Director nativo sí lo hacen.Disparador: videoclip o short_film_audio con MiniMax H3 Legacy (o lote Quick Video, que usa ese modelo) cuyo primer plano empieza después de 0 s — intro instrumental, entrada a mitad de tema. Los labios se generan al verso; el montaje suena el instrumental y
-shortestrecorta el final.Fix: pasar
audio_start_sec=audio_origin_secen el concat final.Tests:
pytest tests/test_director_minimax_h3.py::test_h3_legacy_assembly_offsets_source_audio_to_plan_start— passed. También los tests de concat H3 existentes ytest_rejoin_offsets_source_audio_to_first_planned_time.No reabre #16, #17 ni #18.
Note
Medium Risk
Touches final A/V mux timing for H3 multiclip outputs; wrong offset would still misalign music and dialogue, but the fix aligns assembly with existing per-clip slicing and other pipeline paths.
Overview
Fixes soundtrack desync when MiniMax H3 Legacy (or registry-less H3) assembles a music video or
short_film_audioproject whose first shot starts after 0 s (e.g. skipping an instrumental intro).Per-clip generation already drove from
audio_origin_secvia_audio_timeline_start, but the finalconcatenate_multi_clip_videoscall in_run_minimax_h3_story_videoremuxed the full track from 0:00—so lip-sync matched the verse while the output still played the intro, and-shortestcould trim the end. The change passesaudio_start_sec=audio_origin_secon that final concat, matching rejoin and native Director behavior.Tests update
FakeWgp.concatenate_multi_clip_videosstubs for the new argument and addtest_h3_legacy_assembly_offsets_source_audio_to_plan_start(plan starting at 12.5 s asserts assembly uses the same offset).Reviewed by Cursor Bugbot for commit a47cd57. Configure here.