Skip to content

fix(audio-energy): handle fractional video duration windows - #720

Merged
calesthio merged 1 commit into
OpenMontageInc:mainfrom
ac1982:fix/audio-energy-fractional-window
Nov 8, 2026
Merged

calesthio merged 1 commit into
OpenMontageInc:mainfrom
ac1982:fix/audio-energy-fractional-window

Conversation

@ac1982

@ac1982 ac1982 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The best-window search truncates video duration to an integer. A 0.5-second video produces an empty window and divides by zero; 1.5 seconds is scored as one second. A loud partial final bucket can also be selected despite insufficient audio remaining, incorrectly recommending looping.

Round up to the existing one-second analysis bucket size, restrict candidate starts to those that fit the actual audio duration, and reject nonpositive/nonfinite requested durations with a tool error.

Validation: all 7 regression cases fail before and pass after the change. Also ran the real ffprobe/ebur128 flow against a generated 2-second WAV with a 0.5-second target; it returns a fitting offset successfully. No provider calls.

Checked open/closed audio_energy, fractional, and loudness PRs/issues; existing loudness changes target audio_mixer, not this analysis tool.

@ac1982
ac1982 requested a review from calesthio as a code owner October 7, 2026 10:30
sethshoultes added a commit to sethshoultes/OpenMontage that referenced this pull request Oct 28, 2026
…and footnote, larger labels (designer CHANGE on OpenMontageInc#720)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sethshoultes added a commit to sethshoultes/OpenMontage that referenced this pull request Oct 28, 2026
…e (10s hold), home page labels, bigger footnote, dagger on the tool slide (designer CHANGE on the silent cut, OpenMontageInc#720)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@calesthio calesthio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for correcting fractional audio-energy windows. Reviewed the complete diff against main 63d1087a: positive finite validation, ceiling bucket count, and final-window bounds preserve the remainder without reading past the audio. Validation: isolated offline focused audio-energy suite — 7 passed.

@calesthio calesthio closed this Nov 7, 2026
@calesthio calesthio reopened this Nov 7, 2026
calesthio pushed a commit that referenced this pull request Nov 8, 2026
@calesthio
calesthio merged commit 9b748de into OpenMontageInc:main Nov 8, 2026
1 check passed
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.

2 participants