Commit Graph

12 Commits

Author SHA1 Message Date
CI Bot 528deeb52e chore: rebase到develop + 格式化代码
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 27s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1541h50m9s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1541h50m11s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1541h50m13s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1541h50m13s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1541h50m11s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1542h21m47s
2026-07-14 09:36:04 +08:00
CI Bot 84abfbcfcd feat: 画中画(PiP)能力 - 多图层叠加引擎
新增 PiP 引擎,支持在统一渲染管道中加入多图层画中画叠加:

核心能力:
- 多图层叠加:主画面 + 多个副画面,按 z_index 排序
- 位置:9宫格(top_left/top_center/top_right/center_left/center/center_right/bottom_left/bottom_center/bottom_right)+ 自由坐标(像素或百分比)+ 边距配置
- 大小:宽高缩放(像素或百分比),高度自适应比例
- 圆角裁剪:支持圆角矩形(geq 实现四角圆弧)
- 边框:边框宽度 + 颜色
- 透明度:0-100%(colorchannelmixer)
- 入场出场动画:淡入淡出(fade)、滑入滑出(left/right/top/bottom 四方向)
- 时间同步:每个副画面独立 start_time + duration,enable 表达式控制
- 降级策略:素材不存在/无效时自动跳过,不阻断渲染

系统集成:
- UnifiedRenderService 接入:从 plan.config.pip_config 读取配置
- 在 filter_complex 最终合成环节(字幕之前)叠加 PiP 图层
- 有 PiP 时自动禁用直通模式(需要额外图层叠加)
- 输入索引偏移处理:PiP 素材追加在主输入之后,滤镜引用正确索引

测试覆盖:
- PiPLayerConfig.validate:source/position/opacity/corner_radius/timing/animation 等边界校验
- PiPConfig.from_dict:字典解析、z_index 排序、无效层跳过、默认值
- 位置计算:9宫格全位置 + 自定义像素/百分比 + 边界
- 尺寸解析:像素/百分比/零值/负值
- 滤镜构建:单图层/多图层/透明度/圆角/边框/时间控制/淡入淡出/滑入滑出
- 降级策略:asset_id不存在/本地路径不存在/URL不支持/异常处理

55个新增单测 + 84个现有测试,共139个全绿,零回归
2026-07-14 09:36:03 +08:00
xiaoxia 881eea9195 fix(api+ci): DELETE 204响应体全修复 + isort/black整理 + CI环境兼容 + 测试修复 (#286)
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 9s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1544h21m30s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1544h21m31s
CI/CD Pipeline / Deploy Production (push) Failing after 1544h21m40s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1544h21m40s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Failing after 1544h53m14s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
fix(api+ci): DELETE 204响应体全修复 + isort/black整理 + CI环境兼容 + 测试修复
2026-07-14 07:07:51 +08:00
CI Bot 6fc1abf2f5 Phase 4 Backend P2 cleanup: 异常处理/类型注解/模块拆分/大函数拆分/配置项确认
CI/CD Pipeline / Unit Tests (pull_request) Failing after 7s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 12s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m44s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 2m36s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1555h16m6s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1555h16m8s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1555h16m8s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1555h16m8s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1555h47m43s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1555h47m44s
- P2-1: 10处 except 审查改进(细化异常类型、添加日志)
- P2-2: 22个路由函数类型注解补全
- P2-3: edit_plans.py 拆分为 4 个模块(CRUD/generation/ai/timeline)
- P2-4: generate_video + generate_plan 大函数拆分
- P2-5: unified_render_service.py 拆分(1517→984行)
  - render_audio.py: 音频混音模块(RenderContext + mix/merge 函数)
  - render_subtitles.py: ASS 字幕生成模块
- P2-6: 6个未使用配置项删除确认

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 20:00:54 +08:00
xiaoxia 1b2bccee6f feat(worker): 直通渲染stream copy优化 - 无重编码性能提升10倍+ (#244)
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m57s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1564h13m17s
CI/CD Pipeline / Deploy Production (push) Failing after 1564h13m19s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1564h13m19s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1564h13m21s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1564h13m21s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1564h44m53s
2026-07-13 11:09:27 +08:00
xiaoxia fdcf48103e feat(unified-render): Phase 3 - 音频统一混音 + 灰度观测埋点
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1576h57m50s
CI/CD Pipeline / Frontend Lint (push) Failing after 1m37s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1576h26m17s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1576h26m17s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1576h26m12s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1576h26m15s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1576h26m15s
Phase 3 unified render with audio mixing + gray scale observation metrics
2026-07-12 23:00:51 +08:00
xiaoxia ad86f5bc79 feat(unified-render): Phase 1 内核增强 - scale策略/直通优化/ASS字幕/转场扩充/链路C删除 (#230)
CI/CD Pipeline / Production Browser E2E (push) Failing after 1580h27m54s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1580h27m58s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1580h59m30s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
## 统一渲染引擎 Phase 1 内核增强

### P0 完成

**1. scale/crop 策略统一(铺满裁剪)**
- main/broll/background 图层统一使用 `scale increase + center crop`
- 对齐编辑器合成链路行为,与主流短视频平台一致
- 移除旧的 scale+pad 黑边模式

**2. 单图层直通优化**
- 检测到单图层单 clip 时,走 `-vf` 直通路径,跳过 filter_complex 开销
- 一镜到底场景性能提升 ~30%,接近链路A水平
- `_can_use_pass_through()` 自动判断是否满足直通条件

**3. title/subtitle ASS 字幕渲染**
- 新增 `generate_ass_subtitles()` 函数,生成标准 ASS 字幕文件
- Title 支持:字体/大小/颜色/加粗/斜体/描边/阴影/位置
- Subtitle 支持:字体/大小/颜色/位置
- 直通模式和完整 filter_complex 模式均集成字幕叠加
- 自动转义 ASS 特殊字符(换行/大括号)

### P1 完成

**4. 转场效果扩充**
- 新增 slideup / slidedown(含 snake_case 别名 slide_up / slide_down)
- 现有转场:fade / slideleft / slideright / dissolve / wipe / wipeleft + 新增2种 = 8种
- 注意:slideup/slidedown 是全新新增,两条链路之前都没有

**5. faststart 统一**
- 直通模式和 filter_complex 模式均已包含 `-movflags +faststart`

### 链路C删除

- 删除 `apps/worker/video_processing/editing_modes.py`(657行)
- 删除 `apps/worker/video_processing/video_compose_service.py`(821行)
- 删除 `tests/unit/test_video_compose_security.py`(链路C安全测试)
- 合计删除 ~1478 行业务代码 + ~264 行测试
- **删除前已确认:业务零调用,仅有注释引用,安全删除**

### 测试

- 新增单元测试 27 个(直通优化 + ASS字幕 + fill_crop策略)
- 现有 25 个测试全部通过
- 合计 52 个测试全绿

---------

Co-authored-by: xiaoxia <xiaoxia@example.com>
Co-authored-by: 灵应 <lingying@coze.email>
Reviewed-on: #230
2026-07-12 18:49:31 +08:00
xiaoxia 1e840057cb fix(ci): 修复 Validate job
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m20s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1608h44m54s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1608h44m58s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1608h44m58s
CI/CD Pipeline / Deploy Production (push) Failing after 1608h44m56s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1608h44m56s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1609h16m30s
fix(ci): 修复 Validate job — black 格式化 + isort 排序 + .cache 排除 + celery mock 路径修复
2026-07-11 14:42:53 +08:00
xiaoxia 242497af8b fix: 调换 fps 与 setpts 顺序,修复 P0-3 xfade 多视频转场 PTS 不一致问题 (#210)
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 10s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1629h13m12s
CI/CD Pipeline / Deploy Production (push) Failing after 1629h13m13s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1629h13m13s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1629h13m13s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1629h13m16s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1629h13m16s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
2026-07-10 18:16:01 +08:00
用户CI Test 81984ae938 fix: P0-2 预签名URL诊断日志 + P0-3 xfade exit 234 三重修复
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 13s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1632h40m10s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1632h40m7s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1632h40m10s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1632h40m10s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1632h40m12s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1632h40m12s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
P0-2 (预签名URL staging未生效):
- storage.py get_download_url() 增加诊断日志(bucket=None / sign_url失败)
- 代码逻辑已验证正确,8个单元测试覆盖全路径
- staging问题最可能是未重新部署或OSS凭证未配置

P0-3 (FFmpeg xfade exit 234):
- Fix 1: _build_single_clip_filter 始终 trim 到 effective_duration
- Fix 2: _build_filter_complex 用 effective_duration 计算 xfade offset
- Fix 3: build_xfade_filter_chain 逐步安全钳制 td/offset
  - 动态 first_input_dur 跟踪
  - per-step td 钳制到 available 和 remaining
  - 保证 offset + td ≤ first_input_duration

新增 20 个单元测试全部通过,全量 1213 测试无回归

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:47:09 +08:00
用户CI Test c947abc038 fix: 一键生成 P0 修复 + P1 校验
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1646h57m39s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1646h57m41s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1646h57m41s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1646h57m47s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1646h57m47s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1647h29m11s
P0-1: _download_library_assets 支持双模式查询(asset_library_id / project_id)
       下载失败时抛出 RuntimeError,不再静默忽略
P0-2: OSS 上传失败抛异常 + 上传后 HEAD 校验 URL 可访问性
P0-3: run_ffmpeg 失败时完整 stderr 打到日志(排查 exit code 183)
       _execute_ffmpeg 额外记录 filter_complex 便于诊断
P1:   template_id 存在性校验(不存在/已禁用 → ValueError)
       asset_ids 归属校验(不属于指定项目/素材库 → ValueError)

新增 16 个单元测试覆盖全部修复点,全量 1170 测试通过无回归
2026-07-10 00:28:47 +08:00
xiaoxia 4328854f58 feat: 统一渲染引擎 + 打通一键生成全链路
CI/CD Pipeline / Production Browser E2E (push) Failing after 1648h28m35s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1648h28m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1649h0m7s
2026-07-09 22:59:19 +08:00