fix: audio filter order (denoise before volume) + clarify reverse path comment
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 58s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m32s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m33s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 31s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 33s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m42s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m42s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 2m10s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m33s
AI Code Review / AI Code Review (pull_request) Failing after 4m10s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m51s
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 567h5m45s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 567h5m47s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 567h5m48s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 567h9m40s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 567h5m49s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 567h9m41s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 567h10m37s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 567h9m42s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 567h10m39s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 567h10m35s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 567h10m41s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 567h10m41s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 567h39m37s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 567h39m40s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 567h44m27s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 567h44m31s

- _render_pass_through: move volume filter after denoise to avoid amplifying noise before denoising
- concat_main_audio: add comment explaining speed/reverse go through filter_complex else branch, not simple path
This commit is contained in:
xiaoxia
2026-08-24 00:15:24 +08:00
parent 2f76509a5b
commit a628b4ca8e
2 changed files with 8 additions and 6 deletions
+3 -1
View File
@@ -278,7 +278,9 @@ def concat_main_audio(
has_speed = abs(speed - 1.0) >= 1e-6
if not has_speed and not has_reverse:
# 无调速无倒放:简单命令行,-ss 裁剪更高效
# 无调速无倒放:简单命令行,-ss 裁剪更高效。
# 注意:有调速或倒放时走下方 else 分支(filter_complex),那里正确处理了
# atrim/atempo/reverse/volume/aformat,单 clip 简单路径不需要这些。
command = [
FFMPEG_BIN,
"-y",
@@ -1290,11 +1290,7 @@ class UnifiedRenderService:
if has_audio:
af_parts: list[str] = []
# 片段音量(原声=1.0,静音已在上层排除)
if abs(clip_volume - 1.0) >= 1e-6:
af_parts.append(f"volume={clip_volume:.4f}")
# 音频降噪
# 音频降噪(必须先降噪,再调整音量,否则音量放大会增加降噪难度)
try:
from video_processing.noise_reduction_engine import NoiseReductionConfig, NoiseReductionEngine
@@ -1308,6 +1304,10 @@ class UnifiedRenderService:
except Exception as e:
logger.warning("[unified-render] 直通模式音频降噪应用失败,跳过: %s", e)
# 片段音量(原声=1.0,静音已在上层排除;降噪后再调音量)
if abs(clip_volume - 1.0) >= 1e-6:
af_parts.append(f"volume={clip_volume:.4f}")
# 音频调速(与视频setpts对应,保持音画同步)
speed = UnifiedRenderService._clip_speed(clip)
if abs(speed - 1.0) >= 1e-6: