Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a010acfb7d | ||
|
|
62f8cf04a6 | ||
|
|
70dcc8f8ba |
@@ -1,4 +1,5 @@
|
|||||||
https://live.douyin.com/456576000931,主播: 介休〖烩饕〗大块牛肉饭「摆摊」
|
https://live.douyin.com/456576000931,主播: 介休〖烩饕〗大块牛肉饭「摆摊」
|
||||||
|
https://live.douyin.com/782322393954
|
||||||
https://live.douyin.com/208318182053,主播: 小碗(创业版)
|
https://live.douyin.com/208318182053,主播: 小碗(创业版)
|
||||||
https://live.douyin.com/646935372639,主播: 小雪摆摊记
|
https://live.douyin.com/646935372639,主播: 小雪摆摊记
|
||||||
https://live.douyin.com/956877163856,主播: 饭饱饱
|
https://live.douyin.com/956877163856,主播: 饭饱饱
|
||||||
@@ -7,6 +8,7 @@ https://live.douyin.com/270513395244,主播: 小喻的摆摊日记
|
|||||||
https://live.douyin.com/742474761291,主播: 阿诺椰子•
|
https://live.douyin.com/742474761291,主播: 阿诺椰子•
|
||||||
https://live.douyin.com/820845121901,主播: 地摊闺蜜_创意寿司_(马儿努力版)
|
https://live.douyin.com/820845121901,主播: 地摊闺蜜_创意寿司_(马儿努力版)
|
||||||
https://live.douyin.com/980855021360,主播: 图爸摆摊卖枣糕(日照首家)教学员
|
https://live.douyin.com/980855021360,主播: 图爸摆摊卖枣糕(日照首家)教学员
|
||||||
|
https://live.douyin.com/46238285118
|
||||||
https://live.douyin.com/497155982953,主播: 想吃糖葫芦
|
https://live.douyin.com/497155982953,主播: 想吃糖葫芦
|
||||||
https://live.douyin.com/349973241990,主播: 元气满满饭团(摆摊不摆烂版)
|
https://live.douyin.com/349973241990,主播: 元气满满饭团(摆摊不摆烂版)
|
||||||
https://live.douyin.com/814839174401,主播: 飞飞摆摊不摆烂
|
https://live.douyin.com/814839174401,主播: 飞飞摆摊不摆烂
|
||||||
|
|||||||
91
main.py
91
main.py
@@ -1672,8 +1672,8 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
|||||||
|
|
||||||
# ========== 参数配置(保留你原始配置) ==========
|
# ========== 参数配置(保留你原始配置) ==========
|
||||||
# YT_STREAM_KEY = "qxvb-r47b-r5ju-6ud3-6k7z"
|
# YT_STREAM_KEY = "qxvb-r47b-r5ju-6ud3-6k7z"
|
||||||
youtube_rtmp = f"rtmp://a.rtmp.youtube.com/live2/x04z-564w-aks7-embw-30y4"
|
# youtube_rtmp = f"rtmp://a.rtmp.youtube.com/live2/x04z-564w-aks7-embw-30y4"
|
||||||
# youtube_rtmp="rtmp://192.168.31.184/live/douyin"
|
srs_rtmp="rtmp://127.0.0.1/live/douyin"
|
||||||
|
|
||||||
# # ←←←← 在这块代码的上方先定义你要推的多个地址 ←←←←
|
# # ←←←← 在这块代码的上方先定义你要推的多个地址 ←←←←
|
||||||
# rtmp_targets = [
|
# rtmp_targets = [
|
||||||
@@ -1732,50 +1732,57 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
|||||||
"Referer: https://live.douyin.com/\r\n"
|
"Referer: https://live.douyin.com/\r\n"
|
||||||
"Origin: https://live.douyin.com\r\n"
|
"Origin: https://live.douyin.com\r\n"
|
||||||
)
|
)
|
||||||
ffmpeg_command = [
|
# ffmpeg_command = [
|
||||||
"ffmpeg", "-loglevel", "info",
|
# "ffmpeg", "-loglevel", "info",
|
||||||
"-rw_timeout", "15000000",
|
# "-rw_timeout", "15000000",
|
||||||
"-reconnect", "1", "-reconnect_at_eof", "1", "-reconnect_streamed", "1",
|
# "-reconnect", "1", "-reconnect_at_eof", "1", "-reconnect_streamed", "1",
|
||||||
"-reconnect_delay_max", "15",
|
# "-reconnect_delay_max", "15",
|
||||||
"-fflags", "+genpts+discardcorrupt",
|
# "-fflags", "+genpts+discardcorrupt",
|
||||||
"-err_detect", "ignore_err",
|
# "-err_detect", "ignore_err",
|
||||||
"-thread_queue_size", "8192",
|
# "-thread_queue_size", "8192",
|
||||||
"-headers", douyin_headers,
|
# "-headers", douyin_headers,
|
||||||
"-i", real_url,
|
# "-i", real_url,
|
||||||
"-vf", "scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2:black",
|
# "-vf", "scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2:black",
|
||||||
"-c:v", codec_v, "-preset", preset_v, *tune_param,
|
# "-c:v", codec_v, "-preset", preset_v, *tune_param,
|
||||||
"-b:v", "2500k", "-maxrate", "2500k", "-bufsize", "5000k",
|
# "-b:v", "2500k", "-maxrate", "2500k", "-bufsize", "5000k",
|
||||||
"-g", "50", "-r", "25", "-pix_fmt", "yuv420p",
|
# "-g", "50", "-r", "25", "-pix_fmt", "yuv420p",
|
||||||
"-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
|
# "-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
|
||||||
"-af", "aresample=async=1:first_pts=0",
|
# "-af", "aresample=async=1:first_pts=0",
|
||||||
"-flags", "+global_header",
|
# "-flags", "+global_header",
|
||||||
"-f", "flv", youtube_rtmp
|
# "-f", "flv", youtube_rtmp
|
||||||
# "-f", "tee",
|
# # "-f", "tee",
|
||||||
# "-map", "0:v", "-map", "0:a",
|
# # "-map", "0:v", "-map", "0:a",
|
||||||
# tee_outputs
|
# # tee_outputs
|
||||||
]
|
# ]
|
||||||
|
|
||||||
|
|
||||||
# srs内网配置
|
# srs内网配置
|
||||||
# ffmpeg_command = [
|
ffmpeg_command = [
|
||||||
# "ffmpeg",
|
"ffmpeg",
|
||||||
# "-loglevel", "info",
|
"-loglevel", "info",
|
||||||
# "-err_detect", "ignore_err+explode",
|
|
||||||
# "-fflags", "+genpts+discardcorrupt+igndts",
|
|
||||||
# "-reconnect", "1",
|
|
||||||
# "-reconnect_at_eof", "1",
|
|
||||||
# "-reconnect_streamed", "1",
|
|
||||||
# "-reconnect_delay_max", "7",
|
|
||||||
# "-rw_timeout", "30000000",
|
|
||||||
# "-headers", douyin_headers,
|
|
||||||
|
|
||||||
# # ===== 输入源 =====
|
# ===== 所有「输入选项」必须放在 -i 之前!=====
|
||||||
# "-i", real_url,
|
# "-re", # 必须在这!按真实帧率读
|
||||||
# "-c:v", "copy",
|
"-err_detect", "ignore_err+explode",
|
||||||
# "-c:a", "copy",
|
"-fflags", "+genpts+discardcorrupt+igndts",
|
||||||
# "-max_muxing_queue_size", "9999",
|
"-reconnect", "1",
|
||||||
# "-f", "flv", srs_rtmp
|
"-reconnect_at_eof", "1",
|
||||||
# ]
|
"-reconnect_streamed", "1",
|
||||||
|
"-reconnect_delay_max", "7",
|
||||||
|
"-rw_timeout", "30000000",
|
||||||
|
"-headers", douyin_headers,
|
||||||
|
|
||||||
|
# ===== 输入源 =====
|
||||||
|
"-i", real_url,
|
||||||
|
|
||||||
|
# ===== 输出选项(放在 -i 之后)=====
|
||||||
|
"-c:v", "copy",
|
||||||
|
"-c:a", "copy",
|
||||||
|
# "-copyts",
|
||||||
|
# "-avoid_negative_ts", "disabled",
|
||||||
|
"-max_muxing_queue_size", "9999",
|
||||||
|
"-f", "flv", srs_rtmp
|
||||||
|
]
|
||||||
|
|
||||||
# ---- 单层重试循环(清晰可控) ----
|
# ---- 单层重试循环(清晰可控) ----
|
||||||
proc = None
|
proc = None
|
||||||
|
|||||||
Reference in New Issue
Block a user