SmallPeaches / DanmakuRender

一个可以录制带弹幕直播流的小工具
332 stars 37 forks source link

特定直播间录制失败 #110

Closed latv666 closed 10 months ago

latv666 commented 1 year ago

我发现日志里面的直播源不太对

日志里面,不能用 potplayer 播放 http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0

在录制失败的同时,找了另一个直播间(roomID:10132155,常年播相声),从日志里找到的直播源是 http://al.flv.huya.com/src/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0 手动把 "http://aldirect.flv.huya.com/huyalive" 替换成 "http://al.flv.huya.com/src",后面不变,potplayer 可以播放

用网站(live.douyuex.com)获取到的直播源,可以用 potplayer 播放 http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=50966e0ab835746805acdf115e1ad12f&wsTime=65033446&fm=RFdxOEJjSjNoNkRKdDZUWV8kMF8kMV8kMl8kMw%3D%3D&ctype=tars_mp&fs=bgct&t=102

下面是日志 `[2023-09-14 01:20:24,373][main][DEBUG]: DEBUG VERSION: 4-2023.9.1 [2023-09-14 01:20:24,373][main][DEBUG]: args: Namespace(config='replay.yml', debug=False, default_config='configs/default.yml', skip_update=False, version=False) [2023-09-14 01:20:24,373][main][DEBUG]: Full config: { "音动-Anty女污": { "output_dir": "./直播回放/音动-Anty女污", "output_name": "518428室内{YEAR}{MONTH}{DAY}{HOUR}{MINUTE}{SECOND}", "engine": "streamgears", "segment": 3600, "danmaku": true, "video": true, "auto_render": false, "end_cnt": 1, "resolution": [ 1920, 1080 ], "vid_format": "flv", "flow_cdn": null, "ffmpeg_stream_args": [ "-fflags", "+discardcorrupt", "-reconnect", "1", "-rw_timeout", "10000000", "-analyzeduration", "15000000", "-probesize", "50000000", "-thread_queue_size", "16" ], "disable_lowspeed_interrupt": true, "check_stream_changes": false, "dm_format": "ass", "margin_h": 6, "margin_w": 0.05, "dmrate": 0.4, "font": "Microsoft YaHei", "fontsize": 36, "dst": 20, "dmduration": 16, "opacity": 0.8, "auto_fontsize": true, "outlinecolor": 0, "outlinesize": 1.0, "dm_delay_fixed": 3.0, "dm_auto_restart": 300, "dm_filter": null, "url": "https://www.huya.com/518428", "render": { "output_dir": null, "format": "mp4", "engine": "ffmpeg", "nrenders": 1, "hwaccel_args": [ "-hwaccel", "auto" ], "vencoder": "h264_nvenc", "vencoder_args": [ "-b:v", "15M" ], "aencoder": "aac", "aencoder_args": [ "-b:a", "320K" ], "output_resize": null, "nproc": 2, "bufsize": 100, "danmaku_resort": false } } }

[2023-09-14 01:20:24,381][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:24,676][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:24,680][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:24,928][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:24,930][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'start', 'type': 'info', 'group': '音动-Anty女污'} [2023-09-14 01:20:24,930][init][INFO]: 音动-Anty女污 录制开始. [2023-09-14 01:20:24,932][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:25,230][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:25,235][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:25,496][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:25,662][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:25,922][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:25,924][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=a64c55818897b66fe9f13a1f55c95c80&wsTime=650243b9&seqid=3118765789057&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1424140163558&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. Traceback (most recent call last): File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader__init.py", line 182, in start_helper self.start_once() File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader__init__.py", line 98, in start_once width, height = FFprobe.get_resolution(stream_url,stream_request_header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 115, in get_resolution res = cls.run_ffprobe_livestream(url,header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 95, in run_ffprobe_livestream out = subprocess.check_output([ File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=a64c55818897b66fe9f13a1f55c95c80&wsTime=650243b9&seqid=3118765789057&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1424140163558&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:25,926][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'restart', 'type': 'error', 'group': '音动-Anty女污', 'desc': CalledProcessError(1, ['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=a64c55818897b66fe9f13a1f55c95c80&wsTime=650243b9&seqid=3118765789057&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1424140163558&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet'])} [2023-09-14 01:20:25,928][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:25,926][init][ERROR]: 录制 音动-Anty女污 遇到错误,即将重试. [2023-09-14 01:20:25,929][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=a64c55818897b66fe9f13a1f55c95c80&wsTime=650243b9&seqid=3118765789057&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1424140163558&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:26,201][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:26,204][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'start', 'type': 'info', 'group': '音动-Anty女污'} [2023-09-14 01:20:26,204][init][INFO]: 音动-Anty女污 录制开始. [2023-09-14 01:20:26,207][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:26,485][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:26,488][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:26,744][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:26,819][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:27,107][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:27,109][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=f8c55b0857667da165d8118422bafa9c&wsTime=650243ba&seqid=3113167175549&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1418541548802&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. Traceback (most recent call last): File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader__init.py", line 182, in start_helper self.start_once() File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader\init__.py", line 98, in start_once width, height = FFprobe.get_resolution(stream_url,stream_request_header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 115, in get_resolution res = cls.run_ffprobe_livestream(url,header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 95, in run_ffprobe_livestream out = subprocess.check_output([ File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=f8c55b0857667da165d8118422bafa9c&wsTime=650243ba&seqid=3113167175549&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1418541548802&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:27,110][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'restart', 'type': 'error', 'group': '音动-Anty女污', 'desc': CalledProcessError(1, ['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=f8c55b0857667da165d8118422bafa9c&wsTime=650243ba&seqid=3113167175549&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1418541548802&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet'])} [2023-09-14 01:20:27,111][init][ERROR]: 录制 音动-Anty女污 遇到错误,即将重试. [2023-09-14 01:20:27,112][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=f8c55b0857667da165d8118422bafa9c&wsTime=650243ba&seqid=3113167175549&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1418541548802&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:37,113][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:37,352][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:37,357][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'start', 'type': 'info', 'group': '音动-Anty女污'} [2023-09-14 01:20:37,357][init][INFO]: 音动-Anty女污 录制开始. [2023-09-14 01:20:37,357][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:37,568][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:37,572][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:37,800][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:37,942][connectionpool][DEBUG]: Starting new HTTPS connection (1): mp.huya.com:443 [2023-09-14 01:20:38,195][connectionpool][DEBUG]: https://mp.huya.com:443 "GET /cache.php?m=Live&do=profileRoom&roomid=518428 HTTP/1.1" 200 None [2023-09-14 01:20:38,198][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. Traceback (most recent call last): File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader__init.py", line 182, in start_helper self.start_once() File "C:\Users\host\Desktop\DanmakuRender-4\DMR\Downloader\init__.py", line 98, in start_once width, height = FFprobe.get_resolution(stream_url,stream_request_header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 115, in get_resolution res = cls.run_ffprobe_livestream(url,header) File "C:\Users\host\Desktop\DanmakuRender-4\DMR\utils.py", line 95, in run_ffprobe_livestream out = subprocess.check_output([ File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\host\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:38,199][init][DEBUG]: PIPE MESSAGE: {'src': 'downloader', 'msg': 'restart', 'type': 'error', 'group': '音动-Anty女污', 'desc': CalledProcessError(1, ['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet'])} [2023-09-14 01:20:38,199][init][ERROR]: 录制 音动-Anty女污 遇到错误,即将重试. [2023-09-14 01:20:38,202][init][ERROR]: Command '['tools/ffprobe.exe', '-headers', 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36 \r\n', '-i', 'http://aldirect.flv.huya.com/huyalive/2234765122-2234765122-9598243113231450112-4469653700-10057-A-0-1.flv?wsSecret=087ccdcf5738414238e5734235f17a21&wsTime=650243c5&seqid=3134568433691&ctype=tars_mp&ver=1&fs=bgct&t=102&uid=1439942795887&ratio=0', '-select_streams', 'v:0', '-print_format', 'json', '-show_format', '-show_streams', '-v', 'quiet']' returned non-zero exit status 1. [2023-09-14 01:20:41,410][init][DEBUG]: 'NoneType' object has no attribute 'stop' [2023-09-14 01:20:41,411][init][DEBUG]: render exit. [2023-09-14 01:20:41,411][init][DEBUG]: uploader exit. [2023-09-14 01:20:41,411][init][DEBUG]: Cleaner exit. [2023-09-14 01:20:41,411][init__][DEBUG]: DMR engine stop. `

SmallPeaches commented 1 year ago

这个直播间是一直都不能录吗,还是说偶尔不行?

latv666 commented 1 year ago

这个直播间是一直都不能录吗,还是说偶尔不行?

昨晚发现不行的,八月底的时候录制成功,我感觉是直播源获取的不正确,所以失败,退回 20220515 的版本,也不可以录制

SmallPeaches commented 1 year ago

那应该是获取的流有问题了,我测试一下

SmallPeaches commented 1 year ago

我试了下,好像是阿里的CDN返回的地址不能用,你把CDN改成tx就可以录了

latv666 commented 1 year ago

我试了下,好像是阿里的CDN返回的地址不能用,你把CDN改成tx就可以录了

收到,我试试去