Back to notes
How-to guideBilibiliCDNBrowser Extension

bilibili のカクつきが消える、ひとつの秘密の設定

海外で bilibili が重いとき、DNS の変更や VPN は運任せ。本当の原因は bilibili が割り当てる遅い CDN ノードです。拡張機能ひとつで一番速いノードに固定する方法と、Android・テレビでの対処法。

Updated 2 min30 viewsArticle language

bilibili の動画、カクカクして止まりまくってませんか?

結論だけ:ブラウザ拡張機能を入れる

仕組みはいいから結論だけ:ブラウザにこれを入れてください(同じ機能の Tampermonkey / Violentmonkey スクリプトを入れている人は、先に削除してください)

導入前と導入後

Before

拡張機能オフ:bilibili に割り当てられた Akamai のノード(cdn=…akamaized.net)で、66 kB/s

After

拡張機能オン:同じ動画が 08ct ノード経由になり、1080P+ で 3.3 MB/s

もう少し詳しく知りたい人へ

DNS の変更や VPN が効いたり効かなかったりする理由

海外で bilibili がカクつくと、ネットで調べれば「VPN を使え」「DNS を 8.8.8.8 に変えろ」みたいな話ばかり出てきますが、どれも効くとは限りません

本当の原因は、bilibili が「遅い CDN ノード」を割り当ててくることです。上の方法は結局どれも「いいノードに当たる確率を上げる」だけで、根本的な解決にはなりません。だから効く人もいれば効かない人もいる、完全に運次第です

CDN が何なのか知りたい人は、こちらの技術ブログ記事をどうぞ:How to Actually Fix Bilibili Buffering for Good(英語)

本当の解決策:一番速いノードに固定する

本気で直したいなら、自分の地域で一番いいノードを知って、それに固定するしかありません

そのために作ったのがこの拡張機能です。普段 PC のブラウザで見ているなら、上の拡張機能を入れれば、動画が一番速いノードを通るように強制できます

Android とテレビの場合

Android で見るなら、公式アプリではなく PiliNara というサードパーティの apk を使ってください(ずっと使いやすくて広告なし)
https://github.com/Starfallan/PiliNara/releases

TV ボックスやスマートテレビなら、あの雲なんとか小電視みたいな公式アプリ(正直ひどい)はやめて、blbl アプリを使ってください
https://github.com/roge4444/blblRogerMod/releases

仕組みはどれも同じで、これらのアプリには速度テストと CDN ノードを固定する機能が入っています


最後に

以上、3 年以上いろいろハマり続けてきた僕の本音の共有です。案件ではありません

拡張機能は自分用に作ったもので、ずっと無料です。必要な人の役に立てばうれしいです。欲しい機能やバグ報告は、コメントか DM でどうぞ

入れてみてよかったら、ついでに星 5 つのレビューをもらえると励みになります。または下の GitHub リポジトリにスターをお願いします
https://github.com/a0972199950/bilibili-cdn-switcher?utm_source=lazy_cv&utm_medium=referral&utm_campaign=secret_setting_article&utm_content=ja

Comments(0)

No comments yet. Be the first to share your thoughts!

Related notes

The same 4K video before and after the extension: buffering at 9 KB/s before, 8.8 MB/s after
Tech share11 min

How to Actually Fix Bilibili Buffering for Good

Why popular Bilibili videos play fine overseas while unpopular ones stall: CDN caching and trips back to origin, why the narrowest link sets your speed, why DNS and VPN tricks are hit or miss, and how my extension picks a default node from real tests across 14 Taiwanese ISPs.

繁體中文 / English

CDNSpeedTest while the speed test is running
How-to guide6 min

How to Join the Bilibili CDN Speed Test

Step-by-step guide: download CDNSpeedTest.exe, pass the network check, log in with a QR code, and send the report so the extension can find the fastest Bilibili servers in your country.

繁體中文 / 简体中文 / English / 日本語 / 한국어

Notice on top of the Bilibili player saying the CDN was slow and playback switched to a backup node
Tech share14 min

Detecting CDN Failures in a Bilibili Extension and Falling Back to Backup Nodes

How the extension decides a CDN node is really broken: which errors to ignore, how to detect stalls from currentTime and the forward buffer, why it switches once quietly before asking you, and how it avoids bouncing between nodes. Also covers live streams.

繁體中文 / English

Cover: the Network panel domain changes from upos-hz-mirrorakam.akamaized.net to upos-sz-mirror08ct.bilivideo.com, above the four hook points: __playinfo__, the playurl API, .m4s segments and live streams
Tech share13 min

Rewriting Bilibili's Stream CDN on the Fly from a Chrome Extension's MAIN World

Bilibili's stream URLs arrive through SSR __playinfo__, the playurl API, segment requests and the live API. Using bilibili-cdn-switcher's code, this walks through hooking each path, what gets rewritten, and the traps: one-shot Response bodies, read-only XHR responseText, and speed tests that must bypass your own hooks.

繁體中文 / English

Cover: more testers, better defaults. A loop of four steps: test at home, get custom nodes, report back, update the default list (cdn-list.json), then back to users in the next release
Tech share23 min

How Crowdsourced Speed Tests Keep Improving Bilibili CDN Server Picks

How a Windows speed test app benchmarks 299 Bilibili nodes in people's homes, picks the 10 most stable with layered videos and a three-stage funnel, writes them into the extension on the spot, and sends reports back so each country's default nodes improve by market-share-weighted coverage and missing ISPs get recruited.

繁體中文 / English

Cover: one src/ folder goes through build.mjs into Chrome, Edge and Firefox zips (Chrome and Edge share one sha256), while Safari goes through an Xcode project to the App Store
Tech share19 min

Shipping a Bilibili Extension from One Codebase to Chrome, Edge, Firefox and Safari

How one src/ becomes four store builds, why the zips must be reproducible (with real sha256 runs and a line-ending gotcha), 5-language release notes guarded by a pre-push hook, and which release steps are scripted versus always done by hand.

繁體中文 / English

Cover: one page, two JS worlds. typeof chrome.storage is undefined in the MAIN world console and object in the ISOLATED world; both share the DOM and localStorage and talk via postMessage
Tech share14 min

Chrome Extensions: The Basics of MAIN World and ISOLATED World

Patched window.fetch in a content script and the page ignored you? What the MAIN and ISOLATED worlds can each see, the three ways to pick a world, when to split into two scripts, how they talk through localStorage and postMessage, and which forged messages to reject.

繁體中文 / English