mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
ensureBgmCovers() (duplicated in faceless-explainer, pr-to-video, and product-launch-video's assemble-index.mjs) always re-encodes a short BGM track with libmp3lame, but preserved the source asset's own extension when naming the loop-extended output — so a "bgm.wav" source produced "bgm.loop.wav" containing genuine MP3 audio. ffprobe/ffmpeg/Chromium all decode this correctly via the WAVE_FORMAT_MPEGLAYER3 tag, but a naive/strict WAV parser (e.g. Python's stdlib `wave` module) hard-fails on it. The function's own doc comment already documented the intended output as "*.loop.mp3" — the code just didn't match it. Fix: always emit a .loop.mp3 path regardless of the source extension. music-to-video's assemble-index.mjs does not have this function (it uses the raw BGM asset directly, no loop-extension), so only 3 of the 4 skills needed the change. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>