From b9acf8c86f011b38c1794c66a2844397a7005057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B5=E5=BA=94?= Date: Sun, 13 Sep 2026 23:36:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(worker):=20=E4=BF=AE=E5=A4=8D=E5=83=8F?= =?UTF-8?q?=E7=B4=A0=E6=89=B0=E5=8A=A8color=5Fbalance=E6=BB=A4=E9=95=9C?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4ffmpeg=20exit=3D8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:像素扰动功能(bb98620)在ffmpeg滤镜链中使用了color_balance滤镜名, 但ffmpeg的实际滤镜名是colorbalance(无下划线),导致滤镜解析失败, 报错'No such filter: color_balance',ffmpeg退出码8。 影响:任何启用了像素扰动的变体渲染(默认批量变体会随机启用)都会失败, 表现为进度卡在56%,error_message只显示ffmpeg版本banner。 修复:将ffmpeg滤镜名从color_balance=改为colorbalance=。 内部config key保持color_balance不变(避免兼容问题)。 --- apps/worker/video_processing/unified_render_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/worker/video_processing/unified_render_service.py b/apps/worker/video_processing/unified_render_service.py index 86ea5027c..f03b3788f 100755 --- a/apps/worker/video_processing/unified_render_service.py +++ b/apps/worker/video_processing/unified_render_service.py @@ -2301,13 +2301,13 @@ class UnifiedRenderService: filters.append(f"eq=contrast={contrast:.3f}") elif filt == "color_balance": - # RGB 通道偏移:color_balance=rs=...:gs=...:bs=... + # RGB 通道偏移:colorbalance=rs=...:gs=...:bs=... r = pixel_pert.get("color_r", 0) g = pixel_pert.get("color_g", 0) b = pixel_pert.get("color_b", 0) if r != 0 or g != 0 or b != 0: # color_balance 参数范围 -1.0 ~ 1.0,这里用 /100 转换 - filters.append(f"color_balance=rs={r/100:.3f}:gs={g/100:.3f}:bs={b/100:.3f}") + filters.append(f"colorbalance=rs={r/100:.3f}:gs={g/100:.3f}:bs={b/100:.3f}") @staticmethod def _clip_volume(clip: ResolvedClip) -> float: