This commit is contained in:
eric
2026-03-01 09:22:05 -06:00
parent 03b8d52326
commit f9b1639f3f

View File

@@ -454,8 +454,8 @@ def start_douyin_youtube_ffplay(
"-thread_queue_size", "512", "-thread_queue_size", "512",
"-probesize", "1M", "-probesize", "1M",
"-analyzeduration", "1M", "-analyzeduration", "1M",
"-fps_mode", "cfr",
# 输入源
"-headers", douyin_headers, "-headers", douyin_headers,
"-i", real_url, "-i", real_url,
@@ -466,7 +466,7 @@ def start_douyin_youtube_ffplay(
"pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black", "pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black",
"-c:v", "libx264", "-c:v", "libx264",
"-preset", "veryfast", # 24h 稳定优先medium 长时间可能吃满CPU "-preset", "veryfast", # 24h 稳定优先
"-tune", "zerolatency", "-tune", "zerolatency",
"-profile:v", "high", "-profile:v", "high",
"-level", "4.2", "-level", "4.2",
@@ -476,14 +476,17 @@ def start_douyin_youtube_ffplay(
"-maxrate", "4500k", "-maxrate", "4500k",
"-bufsize", "9000k", "-bufsize", "9000k",
# 2 秒关键帧 # 关键帧 & 延迟
"-g", "50", "-g", "50",
"-keyint_min", "50", "-keyint_min", "50",
"-bf", "0", "-bf", "0",
"-sc_threshold", "0", "-sc_threshold", "0",
"-pix_fmt", "yuv420p", "-pix_fmt", "yuv420p",
# ───────────── 音频(稳定轻量版) ───────────── # 输出恒帧模式(必须在 -i 后面才生效)
"-fps_mode", "cfr",
# ───────────── 音频(轻量稳定版) ─────────────
"-c:a", "aac", "-c:a", "aac",
"-b:a", "160k", "-b:a", "160k",
"-ar", "48000", "-ar", "48000",