LifeActor / ykdl

a video downloader focus on China mainland video sites.(一款专注于中国大陆视频网站的视频下载器。)
https://github.com/LifeActor/ykdl
Other
1.45k stars 285 forks source link

更新后 斗鱼直播 ffmpeg 报错 #602

Closed yoyosnart closed 2 years ago

yoyosnart commented 2 years ago

在提交前,请确保您已经检查了以下内容!

请将错误输出粘贴在下面:

C:\Users\pig>ykdl https://www.douyu.com/96291 --debug
DEBUG:ykdl.util.http:Add <urllib.request.HTTPSHandler object at 0x039B7CD0> to default handlers
DEBUG:ykdl.util.http:Add <urllib.request.ProxyHandler object at 0x03B74550> to default handlers
DEBUG:ykdl.common:host> www.douyu.com
DEBUG:ykdl.common:short_name> douyu
DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/96291
DEBUG:ykdl.util.http:Redirect to URL: https://www.douyu.com/topic/2022SpringST_LOLZF4?rid=96291
DEBUG:斗鱼直播 (DouyuTV):ub98484234: {'decryptedCodes': [], 'resoult': 'v=220120220503&did=4af95e58ae8745a19e303cebc1ca40da&tt=1651584807&sign=4e1fda6826c3e2f0b2e6c40da7b63c6f'}
DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/96291
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/96291':
{"error":0,"msg":"ok","data":{"room_id":96291,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hls1a-akm.douyucdn.cn/live","rtmp_live":"96291r87mQRHeKwa/playlist.m3u8?wsAuth=24a2d0b8d220896d99e89a1d5535beab\u0026token=web-h5-0-96291-32f9ea696b90e923c57a82ad36570accca239a1c5e428054\u0026logo=0\u0026expire=0\u0026did=4af95e58ae8745a19e303cebc1ca40da\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":0,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":4503},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/96291
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/96291':
{"error":0,"msg":"ok","data":{"room_id":96291,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hls1a-akm.douyucdn.cn/live","rtmp_live":"96291r87mQRHeKwa_2000/playlist.m3u8?wsAuth=7f2a3996f38fe4e059284969b941d26e\u0026token=web-h5-0-96291-32f9ea696b90e923e70fb780252e40a2e5a5b3d8298ec52f\u0026logo=0\u0026expire=0\u0026did=4af95e58ae8745a19e303cebc1ca40da\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":3,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":4503},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/96291
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/96291':
{"error":0,"msg":"ok","data":{"room_id":96291,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hls1a-akm.douyucdn.cn/live","rtmp_live":"96291r87mQRHeKwa_900/playlist.m3u8?wsAuth=484cc0e0e67a3cd0ed6e01b3fb2d1e12\u0026token=web-h5-0-96291-32f9ea696b90e923f16d4ef9d98fb04e8f2156686a3bacb1\u0026logo=0\u0026expire=0\u0026did=4af95e58ae8745a19e303cebc1ca40da\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":2,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":4233},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

site:                 斗鱼直播 (DouyuTV)
title:                东北大鹌鹑 整点稀奇古怪的绝活 - 东北大鹌鹑
artist:               东北大鹌鹑
streams:
    - format:         OG
      container:      m3u8
      video-profile:  原画1080P60
    # download-with:  ykdl --format=OG [URL]
DEBUG:ykdl.util.http:get_response> URL: https://hls1a-akm.douyucdn.cn/live/96291r87mQRHeKwa/playlist.m3u8?wsAuth=24a2d0b8d220896d99e89a1d5535beab&token=web-h5-0-96291-32f9ea696b90e923c57a82ad36570accca239a1c5e428054&logo=0&expire=0&did=4af95e58ae8745a19e303cebc1ca40da&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1
Now downloading: 东北大鹌鹑 整点稀奇古怪的绝活 - 东北大鹌鹑_OG_2022-05-03T21:33:30.flv
WARNING:ykdl.util.external:
=================================
  stop downloading by press 'q'
=================================

[hls,applehttp @ 00000280c130ab40] Opening 'https://hls1a-akm.douyucdn.cn/live/96291r87mQRHeKwa/96291r87mQRHeKwa-1651578587.ts?wsAuth=8125421543595ff088b34cecf5969ac2&token=web-h5-418843043-96291-40d650ffa3eddba5ed62b7469850fd71a741aa279d46edce&logo=0&expire=0&did=281e9a55f6d97efbce4e682400061501&ver=Douyu_222042905&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
[hls,applehttp @ 00000280c130ab40] Opening 'https://hls1a-akm.douyucdn.cn/live/96291r87mQRHeKwa/96291r87mQRHeKwa-1651578588.ts?wsAuth=8125421543595ff088b34cecf5969ac2&token=web-h5-418843043-96291-40d650ffa3eddba5ed62b7469850fd71a741aa279d46edce&logo=0&expire=0&did=281e9a55f6d97efbce4e682400061501&ver=Douyu_222042905&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
Input #0, hls,applehttp, from 'https://hls1a-akm.douyucdn.cn/live/96291r87mQRHeKwa/playlist.m3u8?wsAuth=24a2d0b8d220896d99e89a1d5535beab&token=web-h5-0-96291-32f9ea696b90e923c57a82ad36570accca239a1c5e428054&logo=0&expire=0&did=4af95e58ae8745a19e303cebc1ca40da&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1':
  Duration: N/A, start: 9316.674600, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m), 1920x1080 [SAR 1:1 DAR 16:9], 60 tbr, 90k tbn, 120 tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Output #0, flv, to '銝?憭折?暽??渡蝔€憟?芰?蝏暑 - 銝?憭折?暽OG_2022-05-03T21嚗?3嚗?0.flv':  Metadata:
    encoder         : Lavf58.17.101
    Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(tv, smpte170m), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 tbr, 1k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[flv @ 00000280c2b9e800] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
av_interleaved_write_frame(): Invalid data found when processing input
frame=    3 fps=0.0 q=-1.0 Lsize=     198kB time=00:00:00.02 bitrate=64945.9kbits/s speed=2.85x
video:198kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

如果你有其他附言,例如问题只在某个视频发生,或者是一般性讨论或者提出新功能,请在下面添加:

主要问题帽似是这段 [flv @ 00000280c2b9e800] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg) av_interleaved_write_frame(): Invalid data found when processing input

SeaHOH commented 2 years ago

这可能和你使用的 FFmpeg 版本有关,你用的是新的 5.x 还是旧的? 不过也有可能和斗鱼 CDN 有关。

yoyosnart commented 2 years ago

这可能和你使用的 FFmpeg 版本有关,你用的是新的 5.x 还是旧的? 不过也有可能和斗鱼 CDN 有关。

Build: ffmpeg-20180804-1940c27-win64-static

這個版本的

SeaHOH commented 2 years ago

这挺旧的,也许真是它的问题。

yoyosnart commented 2 years ago

这挺旧的,也许真是它的问题。

感谢 更新后目前测试没问题了

yoyosnart commented 2 years ago

这挺旧的,也许真是它的问题。

另外最近有个问题 下载三分钟的长度后会自动断开

image

C:\Users\pig>ykdl https://www.douyu.com/1126960 --debug
DEBUG:ykdl.util.http:Add <urllib.request.HTTPSHandler object at 0x03C47D10> to default handlers
DEBUG:ykdl.util.http:Add <urllib.request.ProxyHandler object at 0x03E04550> to default handlers
DEBUG:ykdl.common:host> www.douyu.com
DEBUG:ykdl.common:short_name> douyu
DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/1126960
DEBUG:ykdl.util.http:Redirect to URL: https://www.douyu.com/topic/EDG_theme2?rid=1126960
DEBUG:斗鱼直播 (DouyuTV):ub98484234: {'decryptedCodes': [], 'resoult': 'v=220120220504&did=4d2818937f634892a8f5ef4d83a52a62&tt=1651651475&sign=8229648b5b346221821367afbea2e135'}
DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/1126960
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/1126960':
{"error":0,"msg":"ok","data":{"room_id":1126960,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hlsa-akm.douyucdn.cn/live","rtmp_live":"1126960rPXROLJ7f/playlist.m3u8?wsAuth=42fa1f93a5de056f888ffc319ff0f7dd\u0026token=web-h5-0-1126960-97b8314bb93dc18ae14aaf32c8f8e6aaf6af5d183a2b7a53\u0026logo=0\u0026expire=0\u0026did=4d2818937f634892a8f5ef4d83a52a62\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":0,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true},{"name":"字幕线路","cdn":"alizm-h5","isH265":false}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":8221},{"name":"蓝光4M","rate":4,"highBit":1,"bit":4000},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/1126960
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/1126960':
{"error":0,"msg":"ok","data":{"room_id":1126960,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hlsa-akm.douyucdn.cn/live","rtmp_live":"1126960rPXROLJ7f_4000/playlist.m3u8?wsAuth=7edb5da0837c9825b4b12518f2dbaee8\u0026token=web-h5-0-1126960-97b8314bb93dc18a00b6290b18307b78662f508abf5060bb\u0026logo=0\u0026expire=0\u0026did=4d2818937f634892a8f5ef4d83a52a62\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":4,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true},{"name":"字幕线路","cdn":"alizm-h5","isH265":false}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":8221},{"name":"蓝光4M","rate":4,"highBit":1,"bit":4000},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/1126960
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/1126960':
{"error":0,"msg":"ok","data":{"room_id":1126960,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hlsa-akm.douyucdn.cn/live","rtmp_live":"1126960rPXROLJ7f_2000/playlist.m3u8?wsAuth=00c2b3a6d4d1eb886d2694cd9256be89\u0026token=web-h5-0-1126960-97b8314bb93dc18a2a119e8e2f8fd94188a4b348bf111abd\u0026logo=0\u0026expire=0\u0026did=4d2818937f634892a8f5ef4d83a52a62\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":3,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true},{"name":"字幕线路","cdn":"alizm-h5","isH265":false}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":8221},{"name":"蓝光4M","rate":4,"highBit":1,"bit":4000},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

DEBUG:ykdl.util.http:get_response> URL: https://www.douyu.com/lapi/live/getH5Play/1126960
DEBUG:ykdl.util.http:parse JSON from 'https://www.douyu.com/lapi/live/getH5Play/1126960':
{"error":0,"msg":"ok","data":{"room_id":1126960,"is_mixed":false,"mixed_live":"","mixed_url":"","rtmp_cdn":"akm-h5","rtmp_url":"https://hlsa-akm.douyucdn.cn/live","rtmp_live":"1126960rPXROLJ7f_900/playlist.m3u8?wsAuth=862bc1488bbb4405459c2956aad512cb\u0026token=web-h5-0-1126960-97b8314bb93dc18a29f33f4023feee178e45b6e7ef0cf455\u0026logo=0\u0026expire=0\u0026did=4d2818937f634892a8f5ef4d83a52a62\u0026pt=2\u0026st=0\u0026origin=tct\u0026mix=0\u0026isp=\u0026pushdouyu=1","client_ip":"114.33.130.174","inNA":0,"rateSwitch":1,"rate":2,"cdnsWithName":[{"name":"主线路1","cdn":"akm-h5","isH265":false},{"name":"备用线路5","cdn":"tct-h5","isH265":true},{"name":"备用线路7","cdn":"hw-h5","isH265":true},{"name":"字幕线路","cdn":"alizm-h5","isH265":false}],"multirates":[{"name":"原画1080P60","rate":0,"highBit":1,"bit":8221},{"name":"蓝光4M","rate":4,"highBit":1,"bit":4000},{"name":"超清","rate":3,"highBit":0,"bit":2000},{"name":"高清","rate":2,"highBit":0,"bit":900}],"isPassPlayer":0,"eticket":null,"online":0,"mixedCDN":"","p2p":0,"streamStatus":1,"smt":0,"p2pMeta":null,"p2pCid":0,"p2pCids":"","player_1":"","h265_p2p":0,"h265_p2p_cid":0,"h265_p2p_cids":"","acdn":"","av1_url":"","rtc_stream_url":"","rtc_stream_config":""}}

site:                 斗鱼直播 (DouyuTV)
title:                余小C:娱乐主播理解一下~ - 余小C真的很强
artist:               余小C真的很强
streams:
    - format:         OG
      container:      m3u8
      video-profile:  原画1080P60
    # download-with:  ykdl --format=OG [URL]
DEBUG:ykdl.util.http:get_response> URL: https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/playlist.m3u8?wsAuth=42fa1f93a5de056f888ffc319ff0f7dd&token=web-h5-0-1126960-97b8314bb93dc18ae14aaf32c8f8e6aaf6af5d183a2b7a53&logo=0&expire=0&did=4d2818937f634892a8f5ef4d83a52a62&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1
Now downloading: 余小C:娱乐主播理解一下~ - 余小C真的很强_OG_2022-05-04T16:04:35.flv
WARNING:ykdl.util.external:
=================================
  stop downloading by press 'q'
=================================

[hls @ 000001fa5b886180] Skip ('#EXT-X-VERSION:3')
[hls @ 000001fa5b886180] Skip ('#EXT-X-ALLOW-CACHE:NO')
[hls @ 000001fa5b886180] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634917.ts?wsAuth=60f9c6c3e7556ce60a55672da9e4cffb&token=web-cph-16674679-1126960-08fab1fcd75c3ba79b5e66f77b5ec4205093c696c08da906&logo=0&expire=0&did=a775001d7e1e4d81452e0e8700041601&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1&v=220120220504&did=a775001d7e1e4d81452e0e8700041601&tt=1651648138&sign=7cfac35e95e1181432b053ec19828de9&rate=-1&ver=Douyu_222042905&iar=1&ive=0&hevc=0&fa=0' for reading
[hls @ 000001fa5b886180] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634918.ts?wsAuth=60f9c6c3e7556ce60a55672da9e4cffb&token=web-cph-16674679-1126960-08fab1fcd75c3ba79b5e66f77b5ec4205093c696c08da906&logo=0&expire=0&did=a775001d7e1e4d81452e0e8700041601&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1&v=220120220504&did=a775001d7e1e4d81452e0e8700041601&tt=1651648138&sign=7cfac35e95e1181432b053ec19828de9&rate=-1&ver=Douyu_222042905&iar=1&ive=0&hevc=0&fa=0' for reading
Input #0, hls, from 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/playlist.m3u8?wsAuth=42fa1f93a5de056f888ffc319ff0f7dd&token=web-h5-0-1126960-97b8314bb93dc18ae14aaf32c8f8e6aaf6af5d183a2b7a53&logo=0&expire=0&did=4d2818937f634892a8f5ef4d83a52a62&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1':
  Duration: N/A, start: 21943.907000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
  Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709/bt709/iec61966-2-1), 1920x1080, 60 fps, 60 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
  Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Output #0, flv, to '余小C:娱乐主播理解一下~ - 余小C真的很强_OG_2022-05-04T16:04:35.flv':
  Metadata:
    encoder         : Lavf59.23.100
  Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709/bt709/iec61966-2-1), 1920x1080, q=2-31, 60 fps, 60 tbr, 1k tbn
    Metadata:
      variant_bitrate : 0
  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[https @ 000001fa5bb19d80] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634919.ts?wsAuth=60f9c6c3e7556ce60a55672da9e4cffb&token=web-cph-16674679-1126960-08fab1fcd75c3ba79b5e66f77b5ec4205093c696c08da906&logo=0&expire=0&did=a775001d7e1e4d81452e0e8700041601&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1&v=220120220504&did=a775001d7e1e4d81452e0e8700041601&tt=1651648138&sign=7cfac35e95e1181432b053ec19828de9&rate=-1&ver=Douyu_222042905&iar=1&ive=0&hevc=0&fa=0' for reading
[hls @ 000001fa5b886180] Skip ('#EXT-X-VERSION:3')
[hls @ 000001fa5b886180] Skip ('#EXT-X-ALLOW-CACHE:NO')
[https @ 000001fa5bb19d80] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634920.ts?wsAuth=42fa1f93a5de056f888ffc319ff0f7dd&token=web-h5-0-1126960-97b8314bb93dc18ae14aaf32c8f8e6aaf6af5d183a2b7a53&logo=0&expire=0&did=4d2818937f634892a8f5ef4d83a52a62&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
[https @ 000001fa5c53e500] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/playlist.m3u8?wsAuth=42fa1f93a5de056f888ffc319ff0f7dd&token=web-h5-0-1126960-97b8314bb93dc18ae14aaf32c8f8e6aaf6af5d183a2b7a53&logo=0&expire=0&did=4d2818937f634892a8f5ef4d83a52a62&pt=2&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
[hls @ 000001fa5b886180] Skip ('#EXT-X-VERSION:3')
[hls @ 000001fa5b886180] Skip ('#EXT-X-ALLOW-CACHE:NO')
[https @ 000001fa5bb19d80] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634921.ts?wsAuth=a1ca132e09b44cc720d736277bf5e2c2&token=app-ipad-40593781-1126960-ad1615d3aae73a97541ac6c20d36c8b507b1f0cebf18c889&logo=0&expire=0&did=ce8bec2898e23e7787a7343400001521&ver=1.743&pt=1&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
[https @ 000001fa5bd61500] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634922.ts?wsAuth=a1ca132e09b44cc720d736277bf5e2c2&token=app-ipad-40593781-1126960-ad1615d3aae73a97541ac6c20d36c8b507b1f0cebf18c889&logo=0&expire=0&did=ce8bec2898e23e7787a7343400001521&ver=1.743&pt=1&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
[https @ 000001fa5bb19d80] Opening 'https://hlsa-akm.douyucdn.cn/live/1126960rPXROLJ7f/1126960rPXROLJ7f-1651634923.ts?wsAuth=a1ca132e09b44cc720d736277bf5e2c2&token=app-ipad-40593781-1126960-ad1615d3aae73a97541ac6c20d36c8b507b1f0cebf18c889&logo=0&expire=0&did=ce8bec2898e23e7787a7343400001521&ver=1.743&pt=1&st=0&origin=tct&mix=0&isp=&pushdouyu=1' for reading
SeaHOH commented 2 years ago

可能和地域有关,在大陆访问 FFmpeg 是可以正常录制的。

yoyosnart commented 2 years ago

可能和地域有关,在大陆访问 FFmpeg 是可以正常录制的。

您好,测试了一下,发现使用ykdl会每三分钟断线一次,但如把--debug中的直播源复制出来单独使用ffmpeg -i "直播源" 的方式下载,就不会断开,是否是ykdl的一些设定导致的?

SeaHOH commented 2 years ago
ffmpeg -y -hide_banner -i "直播源" -headers "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.1) Gecko/20100101 Firefox/60.1\r\n" -protocol_whitelist file,http,https,tls,rtp,tcp,udp,crypto,httpproxy -c copy -bsf:a aac_adtstoasc "输出"

命令大概是这样,我没有相应的网络条件,你可以自己试试,看是那一条参数导致的问题。