''
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
https://live.douyin.com/456576000931,主播: 介休〖烩饕〗大块牛肉饭「摆摊」
|
||||
https://live.douyin.com/208318182053,主播: 小碗(创业版)
|
||||
https://live.douyin.com/646935372639,主播: 小雪摆摊记
|
||||
https://live.douyin.com/956877163856,主播: 饭饱饱
|
||||
https://live.douyin.com/881451071780,主播: YINING一柠手打柠檬茶
|
||||
https://live.douyin.com/270513395244,主播: 小喻的摆摊日记
|
||||
https://live.douyin.com/742474761291,主播: 阿诺椰子•
|
||||
https://live.douyin.com/820845121901,主播: 地摊闺蜜_创意寿司_(马儿努力版)
|
||||
|
||||
22
main.py
22
main.py
@@ -1672,7 +1672,22 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
||||
|
||||
# ========== 参数配置(保留你原始配置) ==========
|
||||
YT_STREAM_KEY = "qxvb-r47b-r5ju-6ud3-6k7z"
|
||||
youtube_rtmp = f"rtmp://a.rtmp.youtube.com/live2/{YT_STREAM_KEY}"
|
||||
youtube_rtmp = f"rtmp://a.rtmp.youtube.com/live2/qxvb-r47b-r5ju-6ud3-6k7z"
|
||||
# youtube_rtmp="rtmp://192.168.31.184/live/douyin"
|
||||
|
||||
# ←←←← 在这块代码的上方先定义你要推的多个地址 ←←←←
|
||||
rtmp_targets = [
|
||||
"rtmp://a.rtmp.youtube.com/live2/qxvb-r47b-r5ju-6ud3-6k7z", # 主频道
|
||||
"rtmp://192.168.31.184/live/douyin", # 备用频道(换成你的第二个 YouTube 密钥)
|
||||
# "rtmp://live-push.bilibili.com/live/xxx?streamkey=xxx", # B站示例
|
||||
# "rtmp://ingest.twitch.tv/ingest/xxxxxxx", # Twitch 示例
|
||||
# 想推几个就加几个
|
||||
]
|
||||
|
||||
# 用 | 拼接所有地址(任何一个断开都不会影响其他)
|
||||
tee_outputs = "|".join([f"[f=flv:onfail=ignore]{url}" for url in rtmp_targets])
|
||||
|
||||
|
||||
|
||||
MAX_RETRY_DELAY = 90
|
||||
INITIAL_RETRY_DELAY = 3
|
||||
@@ -1738,7 +1753,10 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
||||
"-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
|
||||
"-af", "aresample=async=1:first_pts=0",
|
||||
"-flags", "+global_header",
|
||||
"-f", "flv", youtube_rtmp
|
||||
# "-f", "flv", youtube_rtmp
|
||||
"-f", "tee",
|
||||
"-map", "0:v", "-map", "0:a",
|
||||
tee_outputs
|
||||
]
|
||||
|
||||
# ---- 单层重试循环(清晰可控) ----
|
||||
|
||||
Reference in New Issue
Block a user