's'
This commit is contained in:
@@ -5,5 +5,5 @@ key = x04z-564w-aks7-embw-30y4
|
||||
# 可选:是否使用 RTMPS 加密推流,填 否 则用 RTMP(默认 RTMPS)
|
||||
; rtmps = 否
|
||||
|
||||
# 可选:视频比特率 kbps,720p 推荐 4000-6000(YouTube 官方 4-6 Mbps)
|
||||
; bitrate = 4500
|
||||
# 可选:视频比特率 kbps,YouTube 推荐 2500,可填 3000-4500 提高画质
|
||||
; bitrate = 2500
|
||||
@@ -84,7 +84,7 @@ def start_douyin_youtube_ffplay(
|
||||
rtmps_base = "rtmps://a.rtmp.youtube.com/live2/"
|
||||
rtmp_base = "rtmp://a.rtmp.youtube.com/live2/"
|
||||
use_rtmps = True
|
||||
b_v, maxrate, bufsize = "4500k", "5500k", "9000k"
|
||||
b_v, maxrate, bufsize = "2500k", "3000k", "5000k"
|
||||
stream_key = None
|
||||
|
||||
if os.path.exists(config_file):
|
||||
@@ -165,8 +165,8 @@ def start_douyin_youtube_ffplay(
|
||||
if "h264_nvenc" in (enc.stdout or ""):
|
||||
codec_v = "h264_nvenc"
|
||||
video_args = ["-profile:v", "high", "-level", "4.0",
|
||||
"-tune", "ll", "-rc", "vbr", "-cq", "24",
|
||||
"-b:v", b_v, "-maxrate", maxrate, "-bufsize", bufsize]
|
||||
"-tune", "ll", "-rc", "cbr", "-b:v", b_v,
|
||||
"-maxrate", maxrate, "-bufsize", bufsize]
|
||||
print("[INFO] 检测到 NVIDIA GPU → 使用 NVENC 硬件加速")
|
||||
except Exception as e:
|
||||
print(f"[WARN] NVENC 检测失败,回退软件编码: {e}")
|
||||
|
||||
Reference in New Issue
Block a user