feat: 滤镜调色 - 预设库 + 全局滤镜配置 + FFmpeg参数生成 #397

Merged
xiaoxia merged 1 commits from feat/filter-preset into develop 2026-07-17 09:18:24 +08:00
Owner

功能

视频滤镜调色完整后端能力:

滤镜预设库(20个)

  • 基础:原图/明亮/暖色/冷色/高对比/鲜艳(6个)
  • 电影感:电影感/青橙色调(2个)
  • 复古:复古/怀旧/棕褐色(3个)
  • 黑白:经典黑白/高对比黑白/柔和黑白(3个)
  • 风格化:日系/港风/赛博朋克/清新/戏剧感/梦幻(6个)

API 接口

  • GET /api/v1/edit-plans/filter-presets — 滤镜预设列表(分类筛选+关键词搜索)
  • GET /api/v1/edit-plans/{plan_id}/filter — 获取全局滤镜配置
  • PUT /api/v1/edit-plans/{plan_id}/filter — 更新全局滤镜配置

核心实现

  • build_ffmpeg_filter(preset_id, intensity) 生成 FFmpeg eq 滤镜字符串
  • 支持强度调节 0-100(0=原图,100=全量)
  • 支持自定义微调:亮度/对比度/饱和度/色温
  • 设为原图预设时自动关闭滤镜
  • FilterConfig 加入 EditPlanConfigSchema,零侵入向后兼容

测试

  • 26个单元测试全覆盖
  • 原有剪辑计划测试零回归
## 功能 视频滤镜调色完整后端能力: ### 滤镜预设库(20个) - **基础**:原图/明亮/暖色/冷色/高对比/鲜艳(6个) - **电影感**:电影感/青橙色调(2个) - **复古**:复古/怀旧/棕褐色(3个) - **黑白**:经典黑白/高对比黑白/柔和黑白(3个) - **风格化**:日系/港风/赛博朋克/清新/戏剧感/梦幻(6个) ### API 接口 - **GET** `/api/v1/edit-plans/filter-presets` — 滤镜预设列表(分类筛选+关键词搜索) - **GET** `/api/v1/edit-plans/{plan_id}/filter` — 获取全局滤镜配置 - **PUT** `/api/v1/edit-plans/{plan_id}/filter` — 更新全局滤镜配置 ### 核心实现 - `build_ffmpeg_filter(preset_id, intensity)` 生成 FFmpeg eq 滤镜字符串 - 支持强度调节 0-100(0=原图,100=全量) - 支持自定义微调:亮度/对比度/饱和度/色温 - 设为原图预设时自动关闭滤镜 - FilterConfig 加入 EditPlanConfigSchema,零侵入向后兼容 ### 测试 - 26个单元测试全覆盖 - 原有剪辑计划测试零回归
xiaoxia force-pushed feat/filter-preset from 79f2aaf015 to 11545c406c 2026-07-16 13:49:09 +08:00 Compare
auto-approve-bot approved these changes 2026-07-16 21:38:17 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
xiaoxia force-pushed feat/filter-preset from ea7e7a1b22 to 0cbedb7142 2026-07-17 01:17:46 +08:00 Compare
xiaoxia added 1 commit 2026-07-17 07:37:07 +08:00
feat: 滤镜调色 - 预设库 + 全局滤镜配置 + FFmpeg参数生成
CI Build & Deploy Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (pull_request) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 16s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 42s
AI Code Review / AI Code Review (pull_request) Successful in 1m49s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 2m6s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m15s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m39s
a57bc5aab7
- 20个滤镜预设(基础/电影/复古/黑白/风格化 5大类)
- GET /filter-presets 滤镜预设列表(分类筛选+关键词搜索)
- GET /{plan_id}/filter 获取全局滤镜配置
- PUT /{plan_id}/filter 更新全局滤镜配置
- 支持强度调节 0-100、自定义微调(亮度/对比/饱和/色温)
- build_ffmpeg_filter() 生成 FFmpeg eq 滤镜字符串
- FilterConfig 加入计划配置schema,向后兼容
- 26个单元测试全覆盖
xiaoxia force-pushed feat/filter-preset from 0cbedb7142 to a57bc5aab7 2026-07-17 07:37:07 +08:00 Compare
xiaoxia merged commit e8312482d5 into develop 2026-07-17 09:18:24 +08:00
xiaoxia deleted branch feat/filter-preset 2026-07-17 09:18:24 +08:00
Sign in to join this conversation.