fix(P0): 放宽ingest视频编码拦截 + 自动选素材去掉编码过滤 #508

Merged
auto-approve-bot merged 3 commits from fix/p0-ingest-codec-relax into develop 2026-07-18 14:45:53 +08:00
Owner

问题:用户上传 HEVC/VP9/AV1/MPEG4 等常见视频格式,ingest 直接标记 ERROR,素材库看不到。用户不应该需要知道自己的视频是什么编码。

根因:ingest._is_valid_media() 只允许 h264/avc1 白名单编码,自动选素材也有同样的过滤。

修复

  1. ingest 层:SUPPORTED_VIDEO_CODECS 白名单放宽到 20+ 常见视频编码(H.264/HEVC/VP9/AV1/VP8/MPEG-4/MPEG-2/WMV/ProRes/DNxHD 等),非白名单编码也不再拦截,只打 info 日志。只要 ffprobe 能识别的视频都让进。
  2. 自动选素材:去掉编码过滤逻辑,只保留横竖屏过滤作为优化项。
  3. 渲染引擎(legacy/unified)负责 concat 前的编码/像素格式统一。

测试:更新5个编码过滤相关单测,验证编码不再被过滤,17个相关单测全过。

关联:#406

**问题**:用户上传 HEVC/VP9/AV1/MPEG4 等常见视频格式,ingest 直接标记 ERROR,素材库看不到。用户不应该需要知道自己的视频是什么编码。 **根因**:ingest._is_valid_media() 只允许 h264/avc1 白名单编码,自动选素材也有同样的过滤。 **修复**: 1. **ingest 层**:SUPPORTED_VIDEO_CODECS 白名单放宽到 20+ 常见视频编码(H.264/HEVC/VP9/AV1/VP8/MPEG-4/MPEG-2/WMV/ProRes/DNxHD 等),非白名单编码也不再拦截,只打 info 日志。只要 ffprobe 能识别的视频都让进。 2. **自动选素材**:去掉编码过滤逻辑,只保留横竖屏过滤作为优化项。 3. 渲染引擎(legacy/unified)负责 concat 前的编码/像素格式统一。 **测试**:更新5个编码过滤相关单测,验证编码不再被过滤,17个相关单测全过。 **关联**:#406
xiaoxia added the bugbackendP0 labels 2026-07-18 14:21:55 +08:00
xiaoxia added 1 commit 2026-07-18 14:21:55 +08:00
fix: 放宽ingest视频编码拦截 + 自动选素材去掉编码过滤
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 / Build Staging Worker 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
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 21s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 25s
AI Code Review / AI Code Review (pull_request) Failing after 39s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m3s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 16s
Auto Merge CI PRs / Auto Merge on CI Green + Approved (pull_request) Successful in 1m28s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 48s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 1m44s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m41s
0f73069eb1
P0问题:用户上传常见视频格式(HEVC/VP9/AV1等)被ingest直接拦截,
素材库里看不到。渲染引擎才是处理编码差异的地方,ingest层不应该限制。

修改:
1. ingest._is_valid_media(): SUPPORTED_VIDEO_CODECS白名单大幅放宽(20+编码),
   遇到非白名单编码只打info日志,不拦截
2. auto_select_video_assets(): 去掉编码过滤逻辑,只保留横竖屏过滤作为优化
3. 更新5个相关单元测试,验证编码不再被过滤
xiaoxia added 1 commit 2026-07-18 14:38:54 +08:00
fix(test): 更新ingest编码校验测试以匹配放宽后的行为
CI Build & Deploy Pipeline / Build Staging Web 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 Worker 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 / 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 / Build Production Worker Image (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 13s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 17s
AI Code Review / AI Code Review (pull_request) Failing after 31s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 20s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 50s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 40s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 1m6s
Auto Merge CI PRs / Auto Merge on CI Green + Approved (pull_request) Successful in 1m7s
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
041218afa6
- HEVC/H265/VP9/AV1等常见编码从'无效'改为'有效'
- 新增未知编码(mpeg4)也放行的测试
- 大小写不敏感测试断言从False改为True
xiaoxia added 1 commit 2026-07-18 14:41:01 +08:00
style: black格式化ingest.py白名单集合
CI Build & Deploy Pipeline / Build Staging Web Image (pull_request) Has been skipped
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 / 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
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 16s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 18s
AI Code Review / AI Code Review (pull_request) Failing after 37s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 44s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 28s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m41s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 3m13s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m43s
Auto Merge CI PRs / Auto Merge on CI Green + Approved (pull_request) Successful in 4m52s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 20s
2062889828
auto-approve-bot approved these changes 2026-07-18 14:44:14 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot approved these changes 2026-07-18 14:44:14 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot merged commit c7733a6974 into develop 2026-07-18 14:45:53 +08:00
auto-approve-bot deleted branch fix/p0-ingest-codec-relax 2026-07-18 14:45:54 +08:00

🗑️ 预览环境已清理

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

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

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