feat(viral-video): v1.6 single-shot Seedance + director storyboard #2124 #2126

Merged
xiaoxia merged 2 commits from fix/2124-storyboard-pipeline-single-shot into develop 2026-10-01 14:33:25 +08:00
Owner

变更概述

重大架构简化(Seedance 2.5 单次最长30秒,直接出片):

1. 文案输出改为编导分镜脚本

输出从营销口播文案改为专业编导分镜脚本(给 Seedance 用的导演提示词)。CopyResult v1.6 新结构:

  • overview: {theme, total_duration, aspect_ratio}
  • scene_and_lighting: 整体场景+光线描述
  • shots[]: 逐镜头时间轴(每镜含 time_range / shot_type_angle_movement / scene_and_dialogue / action_details / audio_bgm / transition / reference_image_index)
  • hard_constraints[]: 硬性约束(无字幕/无水印/人物一致/口型同步/无变形)
  • negative_prompts[]: 负面提示词(字幕/水印/错误文字/五官崩坏/多余手指/闪烁/模糊)
  • voiceover_script: 完整口播稿(纯文本,用于TTS)

2. Pipeline 简化为4步

  1. _step_image_analysis(VLM分析,加None防护)
  2. _step_script_generation(编导脚本生成,融合原copy_fusion+storyboard+review,输出严格JSON)
  3. _step_tts(整段合成+上传OSS做reference_audios)
  4. _step_render(单次Seedance调用直接出片)
  5. _step_upload(直接上传单个mp4)

3. 删除的代码

  • 多段分镜拆分、ffmpeg concat拼接、placeholder占位视频、分段重试降级
  • BGM单独混音(Seedance generate_audio=true原生合成音效/BGM)
  • _step_copy_fusion / _step_storyboard / _build_segment_prompt / _make_placeholder_clip / _probe_ok
  • concat_engine 导入(保留模块但主流程不再调用)

4. 新增能力

  • ai_client.video_generation/ai_service.call_video_generation 支持 reference_images/reference_audios/reference_videos/generate_audio/model 参数
  • TTS 合成的 mp3 上传 OSS 后作为 reference_audios[0] 驱动整段口型
  • 所有产品图作为 reference_images(首帧通过 image_url 单独传,其余做多参考)
  • 参考视频作为 reference_videos 传入
  • TTS失败兜底:Seedance generate_audio=true 仍可生成有音效的视频(无口型)

5. E2E Bug修复

  • [P0] ffmpeg concat exit 234:架构简化后concat/placeholder整体删除,bug自然消除
  • [P1] image_analysis Alembic migration:087已存在;新增五列补088幂等migration(IF NOT EXISTS)
  • [P1] call_vision() None防护:_step_image_analysis 全路径加 None/非dict/异常 fallback
  • [P2] voice_id/voice_source/video_ratio/video_model:PR #2123已合入,本PR加copy_result列

6. 向后兼容

  • final_copy = voiceover_script、storyboard = shots、generated_copy_text = voiceover_script
  • _build_copy_result 老数据降级拼装(从v1.5 storyboard list[dict]转shots)
  • 旧一键流水线 run_viral_video_pipeline / resume_viral_video_pipeline 保留兼容

参数

  • duration 默认15秒,范围5-30秒(前端下拉 5/10/15/20/25/30s)
  • 首帧图模式不传 ratio(保持#2110修复)
  • Seedance调用超时900s
  • TS types 更新 CopyResult v1.6 结构 + ShotScript/Overview

测试

  • 96个viral相关单测全通过(含v1.6新测试:脚本生成结构/JSON解析容错/prompt组装/参数透传/mark_copy_generated派生字段)
## 变更概述 **重大架构简化**(Seedance 2.5 单次最长30秒,直接出片): ### 1. 文案输出改为编导分镜脚本 输出从营销口播文案改为专业编导分镜脚本(给 Seedance 用的导演提示词)。CopyResult v1.6 新结构: - `overview`: `{theme, total_duration, aspect_ratio}` - `scene_and_lighting`: 整体场景+光线描述 - `shots[]`: 逐镜头时间轴(每镜含 `time_range` / `shot_type_angle_movement` / `scene_and_dialogue` / `action_details` / `audio_bgm` / `transition` / `reference_image_index`) - `hard_constraints[]`: 硬性约束(无字幕/无水印/人物一致/口型同步/无变形) - `negative_prompts[]`: 负面提示词(字幕/水印/错误文字/五官崩坏/多余手指/闪烁/模糊) - `voiceover_script`: 完整口播稿(纯文本,用于TTS) ### 2. Pipeline 简化为4步 1. `_step_image_analysis`(VLM分析,加None防护) 2. `_step_script_generation`(编导脚本生成,融合原copy_fusion+storyboard+review,输出严格JSON) 3. `_step_tts`(整段合成+上传OSS做reference_audios) 4. **`_step_render`(单次Seedance调用直接出片)** 5. `_step_upload`(直接上传单个mp4) ### 3. 删除的代码 - 多段分镜拆分、ffmpeg concat拼接、placeholder占位视频、分段重试降级 - BGM单独混音(Seedance generate_audio=true原生合成音效/BGM) - _step_copy_fusion / _step_storyboard / _build_segment_prompt / _make_placeholder_clip / _probe_ok - concat_engine 导入(保留模块但主流程不再调用) ### 4. 新增能力 - `ai_client.video_generation`/`ai_service.call_video_generation` 支持 `reference_images`/`reference_audios`/`reference_videos`/`generate_audio`/`model` 参数 - TTS 合成的 mp3 上传 OSS 后作为 `reference_audios[0]` 驱动整段口型 - 所有产品图作为 `reference_images`(首帧通过 `image_url` 单独传,其余做多参考) - 参考视频作为 `reference_videos` 传入 - TTS失败兜底:Seedance generate_audio=true 仍可生成有音效的视频(无口型) ### 5. E2E Bug修复 - **[P0] ffmpeg concat exit 234**:架构简化后concat/placeholder整体删除,bug自然消除 - **[P1] image_analysis Alembic migration**:087已存在;新增五列补088幂等migration(IF NOT EXISTS) - **[P1] call_vision() None防护**:`_step_image_analysis` 全路径加 None/非dict/异常 fallback - **[P2] voice_id/voice_source/video_ratio/video_model**:PR #2123已合入,本PR加copy_result列 ### 6. 向后兼容 - `final_copy = voiceover_script`、`storyboard = shots`、`generated_copy_text = voiceover_script` - `_build_copy_result` 老数据降级拼装(从v1.5 storyboard list[dict]转shots) - 旧一键流水线 `run_viral_video_pipeline` / `resume_viral_video_pipeline` 保留兼容 ### 参数 - duration 默认15秒,范围5-30秒(前端下拉 5/10/15/20/25/30s) - 首帧图模式不传 ratio(保持#2110修复) - Seedance调用超时900s - TS types 更新 CopyResult v1.6 结构 + ShotScript/Overview ### 测试 - 96个viral相关单测全通过(含v1.6新测试:脚本生成结构/JSON解析容错/prompt组装/参数透传/mark_copy_generated派生字段)

🚀 预览环境已部署

项目 详情
PR号 #2126
预览链接 https://pr-2126.preview.xiaoxiajianji.com
API环境 staging

💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。

🔄 每次提交新代码后预览环境会自动更新。

🗑️ PR 关闭或合并后,预览环境会自动清理。

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #2126 | | 预览链接 | [https://pr-2126.preview.xiaoxiajianji.com](https://pr-2126.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
xiaoxia force-pushed fix/2124-storyboard-pipeline-single-shot from 84f7f698bc to 6eeb33bbf3 2026-10-01 13:46:04 +08:00 Compare
xiaoxia added 1 commit 2026-10-01 13:55:35 +08:00
feat(viral-video): v1.6 单次Seedance出片+编导分镜脚本 #2124
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m12s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m21s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m29s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 2m0s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 2m10s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m18s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m13s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m42s
AI Code Review / AI Code Review (pull_request) Successful in 6m41s
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
649420bd35
- 输出从营销口播文案改为专业编导分镜脚本(CopyResult v1.6:overview/scene_and_lighting/shots/hard_constraints/negative_prompts/voiceover_script)
- 新 SCRIPT_GENERATION 阶段替代原 copy_fusion+storyboard+review,prompt 指导 LLM 输出严格 JSON 结构
- pipeline 简化为4步:图片分析 → 编导脚本 → TTS整段合成(上传OSS做reference_audios) → 单次Seedance出片 → 上传
- 删除:多段分镜拆分、ffmpeg concat拼接、placeholder占位视频、分段重试降级、BGM单独混音(Seedance generate_audio=true原生合成音效/BGM)
- ai_client/ai_service video_generation 支持 reference_images/reference_audios/reference_videos/generate_audio 参数
- duration 默认15秒,上限30秒;前端时长下拉 5/10/15/20/25/30s
- 首帧图模式不传 ratio(保持 #2110 修复)
- Alembic migration 088 幂等添加 voice_id/voice_source/video_ratio/video_model/copy_result 五列
- _step_image_analysis call_vision() 全路径 None 防护
- 向后兼容:final_copy=voiceover_script、storyboard=shots、老数据 _build_copy_result 降级拼装
- TS types 更新 CopyResult v1.6 结构 + ShotScript/Overview
- 96个 viral 相关单测全通过
xiaoxia force-pushed fix/2124-storyboard-pipeline-single-shot from 8e8f9d5a18 to 649420bd35 2026-10-01 13:55:35 +08:00 Compare
auto-approve-bot added 1 commit 2026-10-01 14:02:57 +08:00
style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m54s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 19s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 10s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m33s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m4s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 35s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 2m38s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 4m15s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 4m49s
AI Code Review / AI Code Review (pull_request) Successful in 6m48s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 7m46s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 11m53s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m43s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 19m21s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 35s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 4m43s
eda3a3a540
xiaoxia merged commit 0200d499ef into develop 2026-10-01 14:33:25 +08:00

🗑️ 预览环境已清理

PR #2126 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #2126 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.