's'
This commit is contained in:
@@ -308,6 +308,49 @@ def start_douyin_youtube_ffplay(
|
||||
|
||||
|
||||
# ====================== 主重试循环(原样保留) ======================
|
||||
ffmpeg_command = [
|
||||
"ffmpeg","-y","-loglevel","info","-nostdin","-re",
|
||||
"-stats","-stats_period","1",
|
||||
|
||||
# 输入稳定
|
||||
"-rw_timeout","30000000",
|
||||
"-reconnect","1","-reconnect_at_eof","1","-reconnect_streamed","1",
|
||||
"-reconnect_delay_max","5",
|
||||
|
||||
# 关键:删除低延迟杀手参数
|
||||
"-fflags","+genpts+discardcorrupt",
|
||||
"-err_detect","ignore_err",
|
||||
"-max_delay","500000",
|
||||
"-thread_queue_size","512",
|
||||
|
||||
# 抖音源
|
||||
"-headers", douyin_headers,
|
||||
"-i", real_url,
|
||||
|
||||
# 视频处理
|
||||
"-vf","fps=25,scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black",
|
||||
|
||||
# 编码
|
||||
"-c:v","libx264",
|
||||
"-preset","veryfast",
|
||||
"-profile:v","high",
|
||||
"-level","4.2",
|
||||
"-b:v","4500k","-maxrate","4500k","-bufsize","9000k",
|
||||
"-g","50","-keyint_min","50",
|
||||
"-r","25",
|
||||
"-pix_fmt","yuv420p",
|
||||
"-bf","0",
|
||||
"-sc_threshold","0",
|
||||
"-x264-params","force-cfr=1:scenecut=0:open_gop=0",
|
||||
|
||||
# 音频(强烈建议简化)
|
||||
"-c:a","aac","-b:a","128k","-ar","44100","-ac","2",
|
||||
"-af","aresample=async=1,volume=1.05",
|
||||
|
||||
# 推流
|
||||
"-flvflags","no_duration_filesize",
|
||||
"-f","flv", youtube_rtmp
|
||||
]
|
||||
proc = None
|
||||
stderr_q = None
|
||||
reader_t = None
|
||||
|
||||
Reference in New Issue
Block a user