Skip to content

Fix documented music configuration in Remotion renders - #1

Draft
Btoala wants to merge 1 commit into
mainfrom
codex/fix-documented-music
Draft

Btoala wants to merge 1 commit into
mainfrom
codex/fix-documented-music

Conversation

@Btoala

@Btoala Btoala commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Documented edit_decisions.audio.music.asset_id configurations could render without background music because asset resolution, staging, and the composition prop shapes did not connect. This change resolves the track against the manifest and sends a playable source and translated fade settings to the existing CinematicRenderer and Explainer compositions.

Changes

  • Support canonical audio.music, legacy top-level music, and existing direct source formats through the Remotion adapter.
  • Reject unknown asset IDs, missing local files, and invalid volume/timing values before launching the render CLI.
  • Preserve explicit mute, composition-specific defaults, narration/SFX payloads, captions, and video data.
  • Fix zero-second fades in both compositions and bump the tool version to invalidate cached silent output.
  • Add 80 passing offline regression cases, six opt-in full-render cases, and configuration documentation.

Adapted from upstream OpenMontageInc#938 (issue OpenMontageInc#937). The upstream FFmpeg music-to-audio_path change is intentionally excluded: that path replaces existing dialogue/SFX and bypasses music volume/fades. FFmpeg, HyperFrames, atelier routing, and existing complete-mix behavior are unchanged.

Independently verified

  • Exact upstream patch and its five reported test files: 57 passed.
  • Adapted local regression selection: 219 passed, 6 skipped (80 new passing cases plus 139 existing related cases; overlaps the upstream run).
  • Six focused regression cases fail against the original base as expected.
  • Two four-second FFmpeg diagnostics made from the staged music source and actual JSX envelope calculations passed decoded-audio checks: expected gain, audible fades, and retained synthetic narration/SFX tones.
  • Existing audio mux/mixing, caption props, staging cleanup, video transitions, profile/palette, and cache regressions passed.
  • make lint, changed Python compilation, Node helper syntax, and patch whitespace/application checks passed.

Required before merge

A full Remotion video render is not verified. The first local browser test aborted because Chromium could not create a required local socket: socket() failed: Operation not permitted (1) (SIGABRT). The remaining browser tests were not run; the six opt-in cases are skipped in the normal suite. The FFmpeg diagnostics are intermediate-contract evidence, not end-to-end Remotion renders.

On a host with existing dependencies and working Chromium, run:

OPENMONTAGE_TEST_REMOTION=1 REMOTION_TEST_BROWSER=/path/to/chromium \
  python -m pytest -q tests/tools/test_video_compose_music_render.py

Keep this PR in draft until those tests pass. No generation APIs, publishing, paid credits, or dependency installations were used for the local verification.

Resolve and stage music assets, translate fade settings, reject missing local
files, preserve existing audio layers, and handle zero-duration fades.
Add offline regression coverage and opt-in browser render tests.

Adapted from upstream OpenMontageInc#938 without its FFmpeg
audio replacement behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant