's'
This commit is contained in:
@@ -9,6 +9,7 @@ import subprocess
|
||||
import threading
|
||||
import re
|
||||
import os
|
||||
import json
|
||||
import configparser
|
||||
|
||||
from web2_proxy_config import merge_child_env
|
||||
@@ -158,6 +159,23 @@ def start_douyin_youtube_ffplay(
|
||||
clean_title = sanitize_title(title)
|
||||
stream_title = sanitize_title(f"{anchor_name}{('_' + clean_title) if clean_title else ''}_{timestamp_str}")
|
||||
print(f"[INFO] {rec_info} 开始推流到 YouTube: {stream_title}")
|
||||
try:
|
||||
print(
|
||||
"[RELAY_META] "
|
||||
+ json.dumps(
|
||||
{
|
||||
"ts": int(time.time()),
|
||||
"anchor": anchor_name,
|
||||
"douyinHint": (real_url or record_name or "")[:400],
|
||||
"streamTitle": stream_title,
|
||||
"youtubeKeySuffix": (stream_key[-8:] if stream_key and len(stream_key) > 8 else stream_key),
|
||||
},
|
||||
ensure_ascii=False,
|
||||
),
|
||||
flush=True,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# ====================== NVENC 检测(符合 YouTube 推荐比特率)======================
|
||||
codec_v = "libx264"
|
||||
|
||||
Reference in New Issue
Block a user