Comments (8)
这可能和你使用的 FFmpeg 版本有关,你用的是新的 5.x 还是旧的?
不过也有可能和斗鱼 CDN 有关。
from ykdl.
这可能和你使用的 FFmpeg 版本有关,你用的是新的 5.x 还是旧的? 不过也有可能和斗鱼 CDN 有关。
Build: ffmpeg-20180804-1940c27-win64-static
這個版本的
from ykdl.
这挺旧的,也许真是它的问题。
from ykdl.
这挺旧的,也许真是它的问题。
感谢 更新后目前测试没问题了
from ykdl.
这挺旧的,也许真是它的问题。
另外最近有个问题 下载三分钟的长度后会自动断开
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
from ykdl.
可能和地域有关,在大陆访问 FFmpeg 是可以正常录制的。
from ykdl.
可能和地域有关,在大陆访问 FFmpeg 是可以正常录制的。
您好,测试了一下,发现使用ykdl会每三分钟断线一次,但如把--debug中的直播源复制出来单独使用ffmpeg -i "直播源" 的方式下载,就不会断开,是否是ykdl的一些设定导致的?
from ykdl.
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 "输出"
命令大概是这样,我没有相应的网络条件,你可以自己试试,看是那一条参数导致的问题。
from ykdl.
Related Issues (20)
- [bililive] Thread message queue blocking; consider raising the thread_queue_size option (current value: 1) HOT 2
- >但是目前最新的网页,貌似没有运行这个地方的代码,断点断不到这个位置。目前发现这个加密是跟url地址有关系 HOT 2
- 腾讯视频解析出的profile不全 HOT 4
- DEPRECATION: ykdl is being installed using the legacy 'setup.py install' method HOT 1
- 好像没法看抖音直播世界杯? HOT 4
- iqiyi部分视频解析报错 HOT 1
- 抖音直播不能看(但是世界杯能看) HOT 2
- 下载合并mpeg ts格式特别慢 HOT 3
- Bilibili bangumi解析使用了过时的API HOT 1
- download video with 480p and over HOT 2
- mediainfo.py 默认文件名时间戳字符串bug
- Python 3.10 windows compability problem HOT 1
- huya 直播不能下载了请求更新 HOT 17
- 虎牙直播 下载几秒就断流,前天刚改了,不能正常下载,biliup以修正,可以参考 HOT 1
- 抖音视频失效 HOT 7
- 问下斗鱼的直播源地址在哪里获取的
- ykdl1.8.2在python3.7.1中不能运行
- bilibili 直播错误 HOT 3
- 抖音直播看不了,退回旧版可以看
- 不能https://www.bilibili.com/video/BV1LM411d7qg/?spm_id_from=333.999.0.0 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ykdl.