feat: 优化学习视频转写与字幕清洗

This commit is contained in:
2026-09-11 14:26:02 +08:00
parent a8fe133aa4
commit eba9163246
12 changed files with 552 additions and 28 deletions
+3 -1
View File
@@ -188,7 +188,9 @@ def invoke(request: InvokeRequest) -> InvokeResponse:
(
f"select='not(mod(n\\,{step}))',"
f"crop={w_px}:{h_px}:{x_px}:{y_px},"
"scale=1280:720:force_original_aspect_ratio=decrease:force_divisible_by=2"
# force_divisible_by 仅在较新 ffmpeg 中可用;PNG 抽帧不要求偶数尺寸,
# 保留等比缩小即可兼容系统版 ffmpeg 4.x。
"scale=1280:720:force_original_aspect_ratio=decrease"
),
# 只写出被选中的帧,避免 CFR 补帧产生重复文件。
"-vsync",