m13253 / BiliDan

Play videos on Bilibili.com with MPV and Danmaku2ASS
http://m13253.blogspot.com/2014/06/watch-bilibili-with-biligrab-danmaku2ass.html
Other
514 stars 69 forks source link

Buffering speed too slow #27

Closed Sg4Dylan closed 9 years ago

Sg4Dylan commented 9 years ago

安装后可以观看视频,但是缓冲速度极慢,极容易中断 (12M电信带宽下缓冲速度每秒大约只有50KB/S) 且暂停后视频不会完全缓冲完毕 但直接将解析信息放入VLC播放却没有这一问题 出现问题的主要是乐视云和直传的视频

Thanks

m13253 commented 9 years ago

给一个测试地址让我试试吧。 引起的不便实在抱歉。

另外,推荐 polipo 这款 HTTP 代理软件,可以开启多线程加速(PMM)功能。

cnbeining commented 9 years ago

请丢一个LOG过来,thx。

对于极端环境(ping高但是速度快),可以考虑Biligrab,整体缓存文件。

初步考虑是乐视云的QoS限制,加上软件本身对于缓冲的处理,造成卡顿的问题。

Sg4Dylan commented 9 years ago

音乐区很多视频都这样,起码我这三日排行周排行的前三都这样 /w\

以下是LOG

david@David-Aspire:~/BiliDan-master$ ./bilidan.py http://www.bilibili.com/video/av2105628/ INFO: Loading video info... INFO: Got video cid: 3266767 INFO: Loading video content... INFO: Got media URLs: 1: http://cn-jsyz1-dx.acgvideo.com/vg4/6/d0/3266767-1.flv?expires=1426874700&ssig=p1rQPDAJEo7QkutP_r0_IA&o=1867260818&rate=64000 INFO: Determining video resolution... INFO: Video resolution: 1280x720 INFO: Loading comments... INFO: Invoking Danmaku2ASS, converting to /tmp/tmp-danmaku2ass-rq13257o.ass WARNING: Invalid comment: '[0,0,"1-1",4.5,"高级弹幕poi",0,0,0,0,500,0,true,"黑体",1,"M92,208L94,201L96,194L99,188L102,181L105,175L108,169L112,163L115,156L119,150L123,145L128,140L133,134L139,129L145,124L152,119L160,115L169,111L179,106L190,102L202,97L215,93L227,89L240,84L253,80L266,77L280,75L292,73L306,71L318,70L331,68L343,68L356,66L' INFO: Launching media player... Playing: http://cn-jsyz1-dx.acgvideo.com/vg4/6/d0/3266767-1.flv?expires=1426874700&ssig=p1rQPDAJEo7QkutP_r0_IA&o=1867260818&rate=64000 [ytdl_hook] youtube-dl not found, not executable, or broken. (+) Video --vid=1 (h264) (+) Audio --aid=1 (aac) (+) Subs --sid=1 'tmp-danmaku2ass-rq13257o.ass' (ass) (external) [vo/opengl/x11] X11 error: GLXBadFBConfig [vo/opengl] Could not create GL3 context. Retrying with legacy context. Opening video filter: [lavfi graph=fps=fps=60:round=down] AO: [pulse] 44100Hz stereo 2ch float VO: [opengl] 1280x720 yuv420p AV: 00:00:05 / 00:05:18 (1%) A-V: 0.000 Cache: 1s+1750KB fontconfig: cannot find glyph U+FF65 in font 'SimHei', falling back to 'Droid Sans Fallback' AV: 00:00:23 / 00:05:18 (7%) A-V: 0.000 Cache: 2s+415KB fontconfig: cannot find font '幼圆', falling back to 'Droid Sans Fallback' AV: 00:00:23 / 00:05:18 (7%) A-V: 0.000 Cache: 2s+349KB fontconfig: cannot find glyph U+2007 in font 'SimHei', falling back to 'DejaVu Sans' AV: 00:00:25 / 00:05:18 (7%) A-V: 0.000 Cache: 1s+29KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:26 / 00:05:18 (8%) A-V: 0.000 Cache: 0s+0KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: 0.000 Cache: 0s+3KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: 0.000 Cache: 0s+3KB

[file-cache] unexpected EOF [file-cache] unexpected EOF

Exiting... (Quit)

david@David-Aspire:~/BiliDan-master$ ./bilidan.py -d http://www.bilibili.com/video/av2105628/ INFO: Loading video info... INFO: Got video cid: 3266767 INFO: Loading video content... INFO: Got media URLs: 1: http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426875000&ssig=EDPLFrg-h9oAk6NED_Sfqg&o=1867260818&rate=64000 INFO: Determining video resolution... INFO: Video resolution: 1280x720 INFO: Loading comments... INFO: Invoking Danmaku2ASS, converting to /tmp/tmp-danmaku2ass-pn_9q9y6.ass WARNING: Invalid comment: '[0,0,"1-1",4.5,"高级弹幕poi",0,0,0,0,500,0,true,"黑体",1,"M92,208L94,201L96,194L99,188L102,181L105,175L108,169L112,163L115,156L119,150L123,145L128,140L133,134L139,129L145,124L152,119L160,115L169,111L179,106L190,102L202,97L215,93L227,89L240,84L253,80L266,77L280,75L292,73L306,71L318,70L331,68L343,68L356,66L' INFO: Launching media player... Playing: http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426875000&ssig=EDPLFrg-h9oAk6NED_Sfqg&o=1867260818&rate=64000 [ytdl_hook] youtube-dl not found, not executable, or broken. (+) Video --vid=1 (h264) (+) Audio --aid=1 (aac) (+) Subs --sid=1 'tmp-danmaku2ass-pn_9q9y6.ass' (ass) (external) [vo/opengl/x11] X11 error: GLXBadFBConfig [vo/opengl] Could not create GL3 context. Retrying with legacy context. Opening video filter: [lavfi graph=fps=fps=60:round=down] AO: [pulse] 44100Hz stereo 2ch float VO: [opengl] 1280x720 yuv420p AV: 00:00:05 / 00:05:18 (1%) A-V: 0.000 Cache: 2s+1690KB fontconfig: cannot find glyph U+FF65 in font 'SimHei', falling back to 'Droid Sans Fallback' AV: 00:00:23 / 00:05:18 (7%) A-V: 0.000 Cache: 1s+385KB fontconfig: cannot find font '幼圆', falling back to 'Droid Sans Fallback' AV: 00:00:23 / 00:05:18 (7%) A-V: 0.000 Cache: 2s+225KB fontconfig: cannot find glyph U+2007 in font 'SimHei', falling back to 'DejaVu Sans' AV: 00:00:25 / 00:05:18 (7%) A-V: 0.000 Cache: 1s+1KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: -0.000 Cache: 0s+0KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: -0.000 Cache: 0s+4KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:28 / 00:05:18 (9%) A-V: 0.000 Cache: 0s+2KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:30 / 00:05:18 (9%) A-V: -0.000 Cache: 0s+1KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:30 / 00:05:18 (9%) A-V: -0.000 Cache: 0s+1KB

[file-cache] unexpected EOF

Exiting... (Quit)

cnbeining commented 9 years ago

极其迅速的dig了一下。

问题好像是出在splitter上:默认的缓冲太温♀柔了,一点都不粗♂暴。

请参考#23 的--mpvflags ' --cache=1048576 ' 以增大缓冲区。

但是,这个只能在一定程度上缓解问题,因为默认的splitter是先充满缓冲区然后播放,直到耗尽。

如果死活不好使,你只能考虑Biligrab了。。。

附:Reference:https://superuser.com/questions/842203/how-to-make-mpc-hc-to-cache-more-aggressively

m13253 commented 9 years ago

如果你不介意全部下载回来再看,可以用 Biligrab。

如果你还是想缓冲的话,首先确认一下 BiliDan、MPV 都是最新版本,默认配置启动,暂停缓冲一分钟再播。 注意观察一下 MPV 悬浮窗里 Cache 的最大值是多少。默认是 12.2MB,用 --mpvflags='--cache=1048576' 改成 0.5GB。

交 log 请用 -v -d 两个参数,能够打印出更详细的信息(当然也有隐私,请自行打码)

各种不便实在抱歉。

Sg4Dylan commented 9 years ago

依旧会卡顿 感觉就是最开始的那几秒钟缓冲极快,然后速度骤降

日志如下

david@David-Aspire:~/BiliDan-master$ ./bilidan.py -v -d --mpvflags='--cache=1024576' http://www.bilibili.com/video/av2105628/ DEBUG: Detected mpv version: git-14b2311 INFO: Loading video info... DEBUG: Fetch: http://api.bilibili.com/view?type=json&id=2105628&appkey=85eb6835b0a1034e&page=1&sign=1f6d4cb58e56a7eb1358e16cac5c36c2 INFO: Got video cid: 3266767 INFO: Loading video content... DEBUG: Fetch: http://interface.bilibili.com/playurl?appkey=85eb6835b0a1034e&cid=3266767&sign=d94724b9de8f6877008cedae69e89b69 INFO: Got media URLs: 1: http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426961400&ssig=HPwYxMgDJrudD3awh6N6Xg&o=1867408272&rate=64000 INFO: Determining video resolution... DEBUG: Executing: ffprobe -icy 0 -loglevel repeat+warning -print_format json -select_streams v -show_streams -timeout 60000000 -user-agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36' -- 'http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426961400&ssig=HPwYxMgDJrudD3awh6N6Xg&o=1867408272&rate=64000' INFO: Video resolution: 1280x720 INFO: Loading comments... DEBUG: Fetch: http://comment.bilibili.com/3266767.xml INFO: Invoking Danmaku2ASS, converting to /tmp/tmp-danmaku2ass-hl1601w5.ass WARNING: Invalid comment: '[0,0,"1-1",4.5,"高级弹幕poi",0,0,0,0,500,0,true,"黑体",1,"M92,208L94,201L96,194L99,188L102,181L105,175L108,169L112,163L115,156L119,150L123,145L128,140L133,134L139,129L145,124L152,119L160,115L169,111L179,106L190,102L202,97L215,93L227,89L240,84L253,80L266,77L280,75L292,73L306,71L318,70L331,68L343,68L356,66L' INFO: Launching media player... DEBUG: Compare mpv version: git-14b2311 >= 0.6 DEBUG: Compare mpv version: git-14b2311 >= 0.4 DEBUG: Executing: mpv --autofit 950x540 --cache-file TMP --framedrop vo --http-header-fields 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML\, like Gecko) Chrome/36.0.1985.125 Safari/537.36' --media-title 【听歌向】【第1期】听完歌就想看的番。 --no-video-aspect --sub-ass --sub-file /tmp/tmp-danmaku2ass-hl1601w5.ass --vf 'lavfi="fps=fps=60:round=down"' --cache=1024576 -- 'http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426961400&ssig=HPwYxMgDJrudD3awh6N6Xg&o=1867408272&rate=64000' Playing: http://cn-zjjh4-dx.acgvideo.com/6/12/3266767-1.flv?expires=1426961400&ssig=HPwYxMgDJrudD3awh6N6Xg&o=1867408272&rate=64000 [ytdl_hook] youtube-dl not found, not executable, or broken. (+) Video --vid=1 (h264) (+) Audio --aid=1 (aac) (+) Subs --sid=1 'tmp-danmaku2ass-hl1601w5.ass' (ass) (external) [vo/opengl/x11] X11 error: GLXBadFBConfig [vo/opengl] Could not create GL3 context. Retrying with legacy context. Opening video filter: [lavfi graph=fps=fps=60:round=down] AO: [pulse] 44100Hz stereo 2ch float VO: [opengl] 1280x720 yuv420p AV: 00:00:05 / 00:05:18 (1%) A-V: -0.000 Cache: 2s+1626KB fontconfig: cannot find glyph U+FF65 in font 'SimHei', falling back to 'Droid Sans Fallback' AV: 00:00:08 / 00:05:18 (2%) A-V: 0.000 Cache: 2s+1466KB fontconfig: cannot find glyph U+2007 in font 'SimHei', falling back to 'DejaVu Sans' AV: 00:00:23 / 00:05:18 (7%) A-V: -0.000 Cache: 1s+213KB fontconfig: cannot find font '幼圆', falling back to 'Droid Sans Fallback' AV: 00:00:24 / 00:05:18 (7%) A-V: 0.000 Cache: 1s+21KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:26 / 00:05:18 (8%) A-V: -0.000 Cache: 0s+3KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: 0.000 Dropped: 1 Cache: 0s+1KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:27 / 00:05:18 (8%) A-V: 0.000 Dropped: 1 Cache: 0s+2KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:29 / 00:05:18 (9%) A-V: -0.000 Dropped: 1 Cache: 0s+1KB [cache] Cache is not responding - slow/stuck network connection? AV: 00:00:30 / 00:05:18 (9%) A-V: 0.000 Dropped: 1 Cache: 1s+21KB [cache] Cache is not responding - slow/stuck network connection? AV: 00:00:32 / 00:05:18 (10%) A-V: 0.000 Dropped: 1 Cache: 1s+21KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:34 / 00:05:18 (10%) A-V: -0.000 Dropped: 1 Cache: 0s+9KB [cache] Cache keeps not responding. (Buffering) AV: 00:00:34 / 00:05:18 (10%) A-V: -0.000 Dropped: 1 Cache: 1s+2KB [cache] Cache is not responding - slow/stuck network connection? AV: 00:00:38 / 00:05:18 (11%) A-V: 0.000 Dropped: 1 Cache: 0s+2KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:38 / 00:05:18 (12%) A-V: -0.000 Dropped: 1 Cache: 1s+2KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:41 / 00:05:18 (12%) A-V: 0.000 Dropped: 1 Cache: 0s+0KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:43 / 00:05:18 (13%) A-V: 0.000 Dropped: 1 Cache: 0s+0KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:43 / 00:05:18 (13%) A-V: 0.000 Dropped: 1 Cache: 1s+2KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:45 / 00:05:18 (14%) A-V: 0.000 Dropped: 1 Cache: 1s+2KB [cache] Cache is not responding - slow/stuck network connection? (Buffering) AV: 00:00:47 / 00:05:18 (15%) A-V: -0.000 Dropped: 1 Cache: 0s+4KB [cache] Cache is not responding - slow/stuck network connection? AV: 00:00:49 / 00:05:18 (15%) A-V: 0.000 Dropped: 1 Cache: 0s+6KB

[file-cache] unexpected EOF [ffmpeg] NULL: AVC: nal size 502 [ffmpeg] NULL: missing picture in access unit with size 448 [file-cache] unexpected EOF

Exiting... (Quit)

m13253 commented 9 years ago

AV: 00:00:05 / 00:05:18 (1%) A-V: -0.000 Cache: 2s+1626KB

只缓冲了 1.6MiB 嘛怎么看嘛…… 要不你先用工具下载回来(比如 Biligrab)再用 --media 参数调用本地文件?

似乎B站真的在限非官方播放器的速……

我再研究研究——最近在报大学有点忙。

cnbeining commented 9 years ago

我在Toronto使用AS40788 ,使用Chrome的UA进行测试,显示了优秀的单线程速度。

有可能是IP-geo 判断不佳造成节点选择的问题吗?还是就是mpv的lavsplitter的缓冲太软?

考虑使用多线程工具直接暴力下载吧。Biligrab内置了danmaku2a♂s♂s,打开选项就可以直接转换成a♂s♂s。

Sg4Dylan commented 9 years ago

求大大给BiliDan增加多线程fetch视频的能力~ 毕竟再去另外下载挂载弹幕就麻烦多了 也只适合收藏较好的投稿

m13253 commented 9 years ago

你可以用 polipo 的 PMM 多线程模式啊……

况且取视频是 mpv 的事,我已经向上游反馈几次情况了。上游也很热心解决了几次问题。但是就是不能明显改善缓冲。

cnbeining commented 9 years ago

对于直接播放,我不认为多线程下载会是有益的。

不能保证,缓冲的部分是按照顺序——如果不能保证,会造成视频中断,乃至更长的缓冲时间。

P.S:直接用Biligrab就是了,选择一个分辨率,自动合并导出转换,配合其他脚本可以播放。。。

m13253 commented 9 years ago

不能保证,缓冲的部分是按照顺序——如果不能保证,会造成视频中断,乃至更长的缓冲时间。

你可以试试 Polipo 的 PMM。它是按顺序分段的,考虑到这个问题了。

直接用Biligrab就是了,选择一个分辨率,自动合并导出转换,配合其他脚本可以播放。。。

他说了不想全下载啊……

Sg4Dylan commented 9 years ago

感谢本项目的付出,让Linux看B站会员视频姿势难度大为降低~ Biligrab和danmaku2ass都是非常棒的软件,保存B站视频(尤其是限定会员的那些)时非常有用(貌似没看到其他的同类完善简便方案)~ 感谢大大的解答~

如果你习惯上B站且想转向日常Linux桌面,请务必转向虚拟机或用HTML5播放插件 插件推荐这个(非安利非利益相关) https://www.v2ex.com/t/179347

m13253 commented 9 years ago

如果你习惯上B站且想转向日常Linux桌面,请务必转向虚拟机或用HTML5播放插件

  1. 虚拟机放视频完全是折磨。那不如装个 Google Chrome 看B站。
  2. MBP 不发热计划我试过,没有高清 HTML5 源,使用的视频源和 BiliDan 的 --source html5 是同一个。

另外谢谢你的支持。

cnbeining commented 9 years ago

我们分开分析一下。

  1. 播放,danmaku2ass已经很成熟。除了代码弹幕不能做,其他都可以。

ABPlayerHTML5-Py-Mac(我当时绝对是脑抽了起这么长的名字)是纯HTML5解决方案。 Mukioplayer-Py-Mac是Flash的。

以上两个配合浏览器使用。

  1. 在线播放HTML5,必须得有H.264的MP4或者WebM的源。

WebM我只见过Youtube。

优酷:MP4没有HD,除非播放器支持直接吃M3U,否则没有HD Sina:MP4的质量你懂的 土豆:不大记得了 乐视云:有HD的MP4,但是扩展名不对 B站直传:有MP4,清晰度好像是二压的

综上,我不认为目前可以捣鼓出什么HTML5的HD东西。 放眼海外,Niconico。。。11区爱上Flash了。Youtube等有原生HTML5支持,都没问题。

就我们苦逼。。。

typcn commented 9 years ago

解析出来的 flv 遇到了相同情况 http://cn-*-dx.acgvideo.com/*.flv 但是 mp4 竟然能跑几十 MB/s http://ws.acgvideo.com/*.mp4

cnbeining commented 9 years ago

建议提供完整的链接信息。

很明显,两个文件很可能不属于一个CDN节点。

鉴于速度随peering,拥塞,QoS,压力而变化,这很有可能是个例。

B

在 2015年3月27日,下午4:58,Niu Tengyu notifications@github.com 写道:

解析出来的 flv 遇到了相同情况 http://cn--dx.acgvideo.com/.flv 但是 mp4 竟然能跑几十 MB/s http://ws.acgvideo.com/*.mp4 http://ws.acgvideo.com/*.mp4 — Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87090422.

typcn commented 9 years ago

我刚刚测试了一下,指定了 --source html5 之后,解析到了同一个 CDN 节点的 MP4 。

但是。。播放非常流畅,我再分析一下是什么原因

typcn commented 9 years ago

只要是 mp4 就可以非常快的播放,但是同一节点下的 flv 则被限速在了 60KB/s 直接把视频地址复制到浏览器中进行下载,刚开始快,然后也变成 60KB/s Chrome 的开发者工具抓不到 Flash 的视频数据包,也懒得搞其他的了,哪天看看请求有什么差别

m13253 commented 9 years ago

Chrome 的开发者工具抓不到 Flash 的视频数据包,也懒得搞其他的了,哪天看看请求有什么差别

Chrome开发者工具抓 Flash 是可能的,但是必须是 Chrome 内置的 PepperFlash,而不是系统自带的 NPAPI Flash。Chromium 不行。

m13253 commented 9 years ago

只要是 mp4 就可以非常快的播放,但是同一节点下的 flv 则被限速在了 60KB/s

B站提供的 MP4 版本往往画质低一点。所以没有默认提供 MP4。 你再看看 MP4 是不是也被限速了呢?

typcn commented 9 years ago

mp4 画质反正我的眼睛看不出差别,分辨率也完全一样,依然没有被限速。 On Sat, Mar 28, 2015 at 09:00 Star Brilliant notifications@github.com wrote:

只要是 mp4 就可以非常快的播放,但是同一节点下的 flv 则被限速在了 60KB/s

B站提供的 MP4 版本往往画质低一点。所以没有默认提供 MP4。 你再看看 MP4 是不是也被限速了呢?

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87134629.

typcn commented 9 years ago

系统自带的早卸了,为了分析视频临时启用了内置的,能看到弹幕的请求,但是看不到视频请求 On Sat, Mar 28, 2015 at 08:58 Star Brilliant notifications@github.com wrote:

Chrome 的开发者工具抓不到 Flash 的视频数据包,也懒得搞其他的了,哪天看看请求有什么差别

Chrome开发者工具抓 Flash 是可能的,但是必须是 Chrome 内置的 PepperFlash,而不是系统自带的 NPAPI Flash。Chromium 不行。

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87134548.

cnbeining commented 9 years ago

你抓两个版本,解流,比较MD5.

注意看interface.bilibili.**的请求。

B

在 2015年3月27日,下午9:07,Niu Tengyu notifications@github.com 写道:

系统自带的早卸了,为了分析视频临时启用了内置的,能看到弹幕的请求,但是看不到视频请求 On Sat, Mar 28, 2015 at 08:58 Star Brilliant notifications@github.com wrote:

Chrome 的开发者工具抓不到 Flash 的视频数据包,也懒得搞其他的了,哪天看看请求有什么差别

Chrome开发者工具抓 Flash 是可能的,但是必须是 Chrome 内置的 PepperFlash,而不是系统自带的 NPAPI Flash。Chromium 不行。

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87134548.

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87136273.

typcn commented 9 years ago

折♂腾了一晚上,待我睡醒再试试 On Sat, Mar 28, 2015 at 09:11 David Zhuang notifications@github.com wrote:

你抓两个版本,解流,比较MD5.

注意看interface.bilibili.**的请求。

B

在 2015年3月27日,下午9:07,Niu Tengyu notifications@github.com 写道:

系统自带的早卸了,为了分析视频临时启用了内置的,能看到弹幕的请求,但是看不到视频请求 On Sat, Mar 28, 2015 at 08:58 Star Brilliant notifications@github.com wrote:

Chrome 的开发者工具抓不到 Flash 的视频数据包,也懒得搞其他的了,哪天看看请求有什么差别

Chrome开发者工具抓 Flash 是可能的,但是必须是 Chrome 内置的 PepperFlash,而不是系统自带的 NPAPI Flash。Chromium 不行。

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87134548.

— Reply to this email directly or view it on GitHub < https://github.com/m13253/BiliDan/issues/27#issuecomment-87136273>.

— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/issues/27#issuecomment-87136751.

m13253 commented 9 years ago

抓不到视频请求试试勾上开发者工具的 Disable cache

typcn commented 9 years ago

我勾选了,还是抓不到。。。

typcn commented 9 years ago

image (划掉)我通过了各种对比,发现是 B 站对第三方 API 的调用进行了限速。 (划掉)与 UA ,Header 全部无关

上图中 rate=0 结尾的是官方播放器解析出的地址,rate=64000 则为该脚本解析出的地址。

将 rate=0 的地址用 mpv 进行播放,默认参数无任何调整,流畅观看很长时间,没有被限速

APPEND:

UA 改为 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Fengfan/1.0

即可获得 rate=0 的地址

m13253 commented 9 years ago

上图中 rate=0 结尾的是官方播放器解析出的地址,rate=64000 则为该脚本解析出的地址。

终于知道 64000 这个数字的含义了啊!64KB/s!

m13253 commented 9 years ago

Fixed