ITADN

fix: animated html_tailwind fails when beat.duration is not specified

#1310Closedisamu 创建于 2026-03-20
I
isamucommented
## Problem Since PR #1300, animated `html_tailwind` beats with `duration: undefined` (relying on audio-derived duration) produce corrupt/empty `.mp4` files. This breaks `yarn movie` for scripts where `beat.duration` is not explicitly set. ### Root Cause PR #1300 changed `processHtmlTailwindAnimated` to skip video generation when `duration === undefined` (for PDF support), but the pipeline still returns `movieFile` and `imageFromMovie: true`, causing `audioChecker` and `extractImageFromMovie` to reference a non-existent/empty `.mp4`. ### Expected Behavior | Workflow | duration available | Expected output | |---|---|---| | `yarn movie` (audio generated) | ✅ `studioBeat.duration` | `.mp4` video + `.png` thumbnail | | `yarn images` / `yarn pdf` (no audio) | ❌ | `.png` final frame (static) | | `yarn movie` (no text, no audio) | ❌ | `.png` fallback (static image in movie) | ### Fix 1. `imagePreprocessAgent`: only set `movieFile`/`imageFromMovie` when duration is available 2. `processHtmlTailwindAnimated`: duration unavailable → generate final-frame PNG only, no `.mp4` 3. When `duration === undefined` and no `.mp4` is generated, `audioChecker` and `extractImageFromMovie` should not reference the animated video path ## User Prompt - nissan.json等のスクリプトで `yarn movie` が失敗する(0バイトの.mp4) - duration未指定 & 音声から取得するスクリプトで、PR #1300以降のregression - 動画はduration必須(ない場合は音声から取る)、PDF(images)は不要。仕様を含め整理
关闭于 2026-03-20 0 条评论