33 Commits
srs ... noypp

Author SHA1 Message Date
eric
e4e68477dd 's' 2025-12-21 18:14:27 -06:00
eric
cc366c0cba 's' 2025-12-21 17:34:30 -06:00
eric
bb87be9ccd 's' 2025-12-21 10:08:57 -06:00
eric
3ea170f8dc 's' 2025-12-21 09:37:41 -06:00
eric
0df754ee45 'd' 2025-12-21 09:32:44 -06:00
eric
f54c324364 's' 2025-12-21 01:17:48 -06:00
eric
e4b0c082b2 's' 2025-12-20 09:31:36 -06:00
eric
7aa77cb473 's' 2025-12-20 09:28:42 -06:00
eric
5770049fbc 's' 2025-12-13 07:19:06 -06:00
eric
b7ad10bb8d 's' 2025-12-13 02:39:43 -06:00
eric
7b3438ad25 s 2025-12-13 08:36:45 +00:00
eric
4385003c24 's' 2025-12-13 02:26:02 -06:00
eric
4f585eea8e 's' 2025-12-13 02:14:58 -06:00
eric
cd4f4f4514 'vlog' 2025-12-13 01:50:49 -06:00
eric
7c47c73d71 's' 2025-12-13 01:47:34 -06:00
eric
c6e2ea2e77 's' 2025-12-13 00:20:07 -06:00
eric
4e1b408e27 's' 2025-12-13 00:18:06 -06:00
eric
4a27659c99 's' 2025-12-13 00:11:42 -06:00
eric
ab8511de5a 's' 2025-12-12 23:24:30 -06:00
eric
90c3f193aa 's' 2025-12-12 23:22:02 -06:00
eric
f4a0c06ff6 's' 2025-12-12 23:20:05 -06:00
eric
2cb81ebb03 's' 2025-12-12 23:17:27 -06:00
eric
26db3d41ce '' 2025-12-12 23:07:03 -06:00
eric
ddadef2287 's' 2025-12-12 22:54:50 -06:00
eric
c717efe8c4 's' 2025-12-12 22:33:41 -06:00
eric
90bb33c9af 's' 2025-12-12 20:42:10 -06:00
eric
1ef411a2d0 's' 2025-12-12 20:33:19 -06:00
eric
27ad068712 's' 2025-12-12 20:29:59 -06:00
eric
dd6d9f7377 s 2025-12-13 02:22:47 +00:00
eric
b00663aa6c 's' 2025-12-12 20:22:18 -06:00
eric
8d3f950303 's' 2025-12-12 20:18:46 -06:00
eric
6d505c1452 's' 2025-12-12 14:11:38 -06:00
eric
c059f62d38 's' 2025-12-12 14:09:44 -06:00
5 changed files with 137 additions and 143 deletions

19
backup/888 Normal file
View File

@@ -0,0 +1,19 @@
ffmpeg_command = [
"ffmpeg", "-loglevel", "info",
"-rw_timeout", "15000000",
"-reconnect", "1", "-reconnect_at_eof", "1", "-reconnect_streamed", "1",
"-reconnect_delay_max", "15",
"-fflags", "+genpts+discardcorrupt",
"-err_detect", "ignore_err",
"-thread_queue_size", "8192",
"-headers", douyin_headers,
"-i", real_url,
"-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,
"-b:v", "2500k", "-maxrate", "2500k", "-bufsize", "5000k",
"-g", "50", "-r", "25", "-pix_fmt", "yuv420p",
"-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
"-af", "aresample=async=1:first_pts=0",
"-flags", "+global_header",
"-f", "flv", youtube_rtmp
]

View File

@@ -1,64 +1,14 @@
https://live.douyin.com/456576000931,主播: 介休〖烩饕〗大块牛肉饭「摆摊」
https://live.douyin.com/782322393954
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,主播: 地摊闺蜜_创意寿司_(马儿努力版)
https://live.douyin.com/980855021360,主播: 图爸摆摊卖枣糕(日照首家)教学员
https://live.douyin.com/46238285118
https://live.douyin.com/497155982953,主播: 想吃糖葫芦
https://live.douyin.com/349973241990,主播: 元气满满饭团(摆摊不摆烂版)
https://live.douyin.com/814839174401,主播: 飞飞摆摊不摆烂
https://live.douyin.com/597618993066,主播: 婷婷的茶生活
https://live.douyin.com/782322393954,主播: 小葵(摆摊版)
https://live.douyin.com/16531926455,主播: 木黎黎
https://live.douyin.com/739670432305,主播: 干饭007
https://live.douyin.com/486789870173,主播: 凉皮西施—豆豆
https://live.douyin.com/15652099787,主播: 莹莹在摆摊
https://live.douyin.com/572442812068,主播: 小小
https://live.douyin.com/477961427964,主播: 小鱼
https://live.douyin.com/686507122231,主播: 上海少妇鲜果茶
https://live.douyin.com/50627104055,主播: 冷阿姨
https://live.douyin.com/339454333072,主播: 小安炒粉
https://live.douyin.com/72212955083,主播: 花老板回村了
https://live.douyin.com/280422307519,主播: 早餐妹
https://live.douyin.com/651293616593,主播: 会發的黄
https://live.douyin.com/114111936890,主播: 小乖早安_(小七泡面)
https://live.douyin.com/43665279648,主播: 喵喵老师
https://live.douyin.com/122383435921,主播: 婷饱饱
https://live.douyin.com/92876979328,主播: 福宝(野摊小馄饨)
https://live.douyin.com/517715534931,主播: 一只羊
https://live.douyin.com/460525712926,主播: 丽姐摆摊记
https://live.douyin.com/745606325880,主播: w、(摆摊日记_)
https://live.douyin.com/675343045974,主播: 张子沐的串串(你的电子榨菜)
https://live.douyin.com/673565298571,主播: 轻舟已撞大冰山(摆摊vlog)
https://live.douyin.com/835571459859,主播: 海绵饱饱
https://live.douyin.com/152358755212,主播: 大美_红烧肉
https://live.douyin.com/990825651731,主播: 王同学摆摊日记(蜜汁烤鸡腿)
https://live.douyin.com/591442402624,主播: 76696515302
https://live.douyin.com/967381081829,主播: 憨憨的摆摊日记
https://live.douyin.com/78012762575,主播: 摆摊儿去划水
https://live.douyin.com/163813589919,主播: 不要熬夜(摆摊中)
https://live.douyin.com/498368994814,主播: 剪头发的小帆帆
https://live.douyin.com/617848099204,主播: 果妈要努力
https://live.douyin.com/821525628944,主播: 李熙雨⭐
https://live.douyin.com/993102287144,主播: 小茗早餐(薪笼记助创官)
https://live.douyin.com/701547125568,主播: 悠悠包
https://live.douyin.com/816130992220,主播: 甜昕冰冰的摆摊日记
https://live.douyin.com/876468215361,主播: 晓晓和凡凡
https://live.douyin.com/511335278313,主播: 秘书(摆摊休息版)
https://live.douyin.com/483160615952,主播: 小胡同学你好(饭团版)
https://live.douyin.com/525514386431,主播: 阿闯烤肉夹馍
https://live.douyin.com/8687122573,主播: 小彤炒粉
https://live.douyin.com/642534242822,主播: (小王_)煎饼果子
https://live.douyin.com/743565594721,主播: 汪汪汪小妞
https://live.douyin.com/249578288248,主播: 思思努力版
https://live.douyin.com/472140253414,主播: 戴盘龙
https://live.douyin.com/700846653732,主播: 三哥大锅菜_炒鸡(国基路店)官方号
https://live.douyin.com/81849868631,主播: 纯儿²¹(休息勿跑空哦)
https://live.douyin.com/690114366322,主播: 卤味鲜(东大)
https://live.douyin.com/469980190666,主播: 茜茜柠檬茶(小米茶档_)
https://live.douyin.com/388066418744,主播: 加速姐的摆摊日记
https://live.douyin.com/372551154040
https://live.douyin.com/203476627795
https://live.douyin.com/174360482665
https://live.douyin.com/651493903077
https://live.douyin.com/503988877962
https://live.douyin.com/664793904394
https://live.douyin.com/162450932525
https://live.douyin.com/182011399880
https://live.douyin.com/473695498831
https://live.douyin.com/210443559964
https://live.douyin.com/21146786242
https://live.douyin.com/210443559964
https://live.douyin.com/369626255042
https://live.douyin.com/41148117948

View File

@@ -8,7 +8,7 @@ language(zh_cn/en) = zh_cn
保存文件名是否包含标题 =
是否去除名称中的表情符号 =
视频保存格式ts|mkv|flv|mp4|mp3音频|m4a音频 = ts
原画|超清|高清|标清|流畅 = 高清
原画|超清|高清|标清|流畅 = 原画
是否使用代理ip(是/否) =
代理地址 =
同一时间访问网络的线程数 = 3

146
main.py
View File

@@ -1672,8 +1672,8 @@ 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/x04z-564w-aks7-embw-30y4"
srs_rtmp="rtmp://127.0.0.1/live/douyin"
youtube_rtmp = f"rtmp://a.rtmp.youtube.com/live2/ue78-1c3e-mr9g-14mz-9r4z" #没有ypp的美食频道
# youtube_rtmp="rtmp://192.168.31.184/live/douyin"
# # ←←←← 在这块代码的上方先定义你要推的多个地址 ←←←←
# rtmp_targets = [
@@ -1688,11 +1688,15 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
MAX_RETRY_DELAY = 90
INITIAL_RETRY_DELAY = 3
NO_FRAME_TIMEOUT = 120
START_CHECK_AFTER = 25.0
STALE_OUTPUT_SECONDS = 40
STDERR_QUEUE_TIMEOUT = 1.0
NO_FRAME_TIMEOUT = 120
START_CHECK_AFTER = 25
STALE_OUTPUT_SECONDS = 40 #120
END_KEYWORDS = [
"connection reset by peer",
"failed to write trailer",
@@ -1732,57 +1736,112 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
"Referer: https://live.douyin.com/\r\n"
"Origin: https://live.douyin.com\r\n"
)
# 720p
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+nobuffer+flush_packets",
"-flags", "low_delay",
"-err_detect", "ignore_err",
"-max_delay", "80000",
"-thread_queue_size", "2048",
"-headers", douyin_headers,
"-i", real_url,
# 720p
"-vf", "fps=30,scale=720:1280:force_original_aspect_ratio=decrease:flags=lanczos,pad=720:1280:(ow-iw)/2:(oh-ih)/2:black",
"-c:v", "libx264",
"-preset", "fast",
# "-tune", "zerolatency",
"-profile:v", "high",
# 720p
# "-minrate", "3200k","-b:v", "3200k", "-maxrate", "3200k", "-bufsize", "6400k", # bufsize = 2× bitrate保持真 CBR
"-b:v", "2600k","-maxrate", "3000k","-bufsize", "5200k",
"-vsync", "cfr",
"-g", "60", "-keyint_min", "60",
"-r", "30",
"-bf", "0",
"-sc_threshold", "0",
# "-nal-hrd", "cbr", # 改2强制 CBR
# 720p
# "-x264-params", "nal-hrd=cbr:force-cfr=1:scenecut=0:filler=1", # 改3简化 params锁死 CBR
"-x264-params", "force-cfr=1:scenecut=0:open_gop=0:sync-lookahead=0",
"-pix_fmt", "yuv420p",
"-c:a", "aac", "-b:a", "128k", "-ar", "48000", "-ac", "2", # 改41080p可音频上 128kYouTube 推荐)
"-af", "aresample=async=1:first_pts=0",
"-flags", "+global_header",
"-flvflags", "no_duration_filesize",
"-f", "flv", youtube_rtmp
]
# 1080p
# ffmpeg_command = [
# "ffmpeg", "-loglevel", "info",
# "-rw_timeout", "15000000",
# "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", "15",
# "-fflags", "+genpts+discardcorrupt",
# "-reconnect_delay_max", "5",
# "-fflags", "+genpts+discardcorrupt+nobuffer+flush_packets",
# "-flags", "low_delay",
# "-err_detect", "ignore_err",
# "-thread_queue_size", "8192",
# "-max_delay", "80000",
# "-thread_queue_size", "2048",
# "-headers", douyin_headers,
# "-i", real_url,
# "-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,
# "-b:v", "2500k", "-maxrate", "2500k", "-bufsize", "5000k",
# "-g", "50", "-r", "25", "-pix_fmt", "yuv420p",
# "-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
# # 1080p
# "-vf","fps=30,scale=1080:1920:force_original_aspect_ratio=decrease:flags=lanczos,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black",
# "-c:v", "libx264",
# "-preset", "veryfast",
# "-tune", "zerolatency",
# "-profile:v", "high",
# # 1080p
# "-b:v", "5200k", "-maxrate", "5800k", "-bufsize", "10400k", # 改12× bufsize真 CBR
# "-vsync", "cfr",
# "-g", "60", "-keyint_min", "60",
# "-r", "30",
# "-bf", "0",
# "-sc_threshold", "0",
# # "-nal-hrd", "cbr", # 改2强制 CBR
# # 1080p
# "-x264-params","force-cfr=1:scenecut=0:open_gop=0:sync-lookahead=0",
# "-pix_fmt", "yuv420p",
# "-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-ac", "2",
# "-af", "aresample=async=1:first_pts=0",
# "-flags", "+global_header",
# "-flvflags", "no_duration_filesize",
# "-f", "flv", youtube_rtmp
# # "-f", "tee",
# # "-map", "0:v", "-map", "0:a",
# # tee_outputs
# ]
# srs内网配置
ffmpeg_command = [
"ffmpeg",
"-loglevel", "info",
# ffmpeg_command = [
# "ffmpeg",
# "-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 之前!=====
# "-re", # 必须在这!按真实帧率读
"-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", real_url,
# ===== 输出选项(放在 -i 之后)=====
"-c:v", "copy",
"-c:a", "copy",
# "-copyts",
# "-avoid_negative_ts", "disabled",
"-max_muxing_queue_size", "9999",
"-f", "flv", srs_rtmp
]
# # ===== 输入源 =====
# "-i", real_url,
# "-c:v", "copy",
# "-c:a", "copy",
# "-max_muxing_queue_size", "9999",
# "-f", "flv", srs_rtmp
# ]
# ---- 单层重试循环(清晰可控) ----
proc = None
@@ -1987,6 +2046,7 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
def backup_file(file_path: str, backup_dir_path: str, limit_counts: int = 6) -> None:
try:
if not os.path.exists(backup_dir_path):
os.makedirs(backup_dir_path)

View File

@@ -1,38 +1,3 @@
ue78-1c3e-mr9g-14mz-9r4z # 没有ypp的美食
qxvb-r47b-r5ju-6ud3-6k7z # vlog频道
x04z-564w-aks7-embw-30y4 #美食ypp
; https://live.douyin.com/517715534931,主播: 一只羊
; https://live.douyin.com/460525712926,主播: 丽姐摆摊记
; https://live.douyin.com/745606325880,主播: w、(摆摊日记_)
; https://live.douyin.com/675343045974,主播: 张子沐的串串(你的电子榨菜)
; https://live.douyin.com/673565298571,主播: 轻舟已撞大冰山(摆摊vlog)
; https://live.douyin.com/835571459859,主播: 海绵饱饱
; https://live.douyin.com/152358755212,主播: 大美_红烧肉
; https://live.douyin.com/990825651731,主播: 王同学摆摊日记(蜜汁烤鸡腿)
; https://live.douyin.com/591442402624,主播: 76696515302
; https://live.douyin.com/967381081829,主播: 憨憨的摆摊日记
; https://live.douyin.com/78012762575,主播: 摆摊儿去划水
; https://live.douyin.com/163813589919,主播: 不要熬夜(摆摊中)
; https://live.douyin.com/498368994814,主播: 剪头发的小帆帆
; https://live.douyin.com/617848099204,主播: 果妈要努力
; https://live.douyin.com/821525628944,主播: 李熙雨⭐
; https://live.douyin.com/993102287144,主播: 小茗早餐(薪笼记助创官)
; https://live.douyin.com/701547125568,主播: 悠悠包
; https://live.douyin.com/816130992220,主播: 甜昕冰冰的摆摊日记
; https://live.douyin.com/876468215361,主播: 晓晓和凡凡
; https://live.douyin.com/511335278313,主播: 秘书(摆摊休息版)
; https://live.douyin.com/483160615952,主播: 小胡同学你好(饭团版)
; https://live.douyin.com/525514386431,主播: 阿闯烤肉夹馍
; https://live.douyin.com/8687122573,主播: 小彤炒粉
; https://live.douyin.com/642534242822,主播: (小王_)煎饼果子
; https://live.douyin.com/743565594721,主播: 汪汪汪小妞
; https://live.douyin.com/249578288248,主播: 思思努力版
; https://live.douyin.com/472140253414,主播: 戴盘龙
; https://live.douyin.com/700846653732,主播: 三哥大锅菜_炒鸡(国基路店)官方号
; https://live.douyin.com/81849868631,主播: 纯儿²¹(休息勿跑空哦)
; https://live.douyin.com/690114366322,主播: 卤味鲜(东大)
; https://live.douyin.com/469980190666,主播: 茜茜柠檬茶(小米茶档_)
; https://live.douyin.com/388066418744,主播: 加速姐的摆摊日记