feat: 绿幕抠像 + 音频降噪引擎(Chroma Key + Noise Reduction) #303

Merged
xiaoxia merged 3 commits from feat/chroma-key-and-noise-reduction into develop 2026-07-14 10:52:01 +08:00

3 Commits

Author SHA1 Message Date
xiaoxia-bot 91509d7b6b fix: 合并重复的mix_audio调用(BGM+降噪合并为一次)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 38s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m35s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m38s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (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 / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1m44s
2026-07-14 10:47:35 +08:00
xiaoxia-bot 4d137a5836 chore: black + isort 格式化
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 36s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 1m5s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m9s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (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 / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1m4s
2026-07-14 10:41:58 +08:00
CI Bot 492ae582e8 feat: 绿幕抠像 + 音频降噪引擎
新增两个渲染能力:

【绿幕抠像 ChromaKeyEngine】
- 基于 FFmpeg colorkey 滤镜,支持绿幕/蓝幕/红幕
- 可配置:抠除颜色、相似度、边缘平滑、溢色抑制
- 5种预设:green_screen/blue_screen/red_screen/precise_green/soft_green
- 从 clip.config.chroma_key 读取配置,零侵入数据模型
- 降级策略:参数越界自动钳制,解析失败不阻断渲染

【音频降噪 NoiseReductionEngine】
- 基于 FFmpeg afftdn 滤镜(短时傅里叶变换降噪)
- 3档预设:低/中/高 + 自定义阈值(-60~-5 dB)
- 人声增强模式:highpass + compressor + loudnorm
- 从 plan.config.audio_noise_reduction 读取配置
- 降级策略:参数越界自动钳制,降噪失败用原始音频

【系统集成】
- 绿幕抠像:UnifiedRenderService Step 1 接入(scale之后,fps之前)
  - 支持 filter_complex 路径 + 直通模式 双路径
- 音频降噪:后处理模式,在 mix_audio 最终输出前应用
  - filter_complex 路径通过 RenderContext 传递配置
  - 直通模式通过 -af 参数应用

69个新增单测 + 1435个现有测试 = 1504个全绿,零回归
2026-07-14 10:41:58 +08:00