Lainbo

Lainbo's Blog

If you’re nothing without the suit, then you shouldn't have it.
github
email
follow

Bilibili Playback Optimization - Disable PCDN

Recently, I suddenly realized why my gigabit broadband experiences buffering when playing videos on Bilibili, especially for high-definition materials uploaded by smaller creators. The experience of dragging the progress bar is very poor, and after some searching, I found out that it was due to being assigned to a relatively poor CDN.

Conclusion First#

Regardless of the method used, whether it's proxy software for traffic diversion or Adguard, it doesn't matter what software you use. Block the following three domain suffixes using any method you are familiar with:

mcdn.bilivideo.com
mcdn.bilivideo.cn
szbdyd.com

For example:

// Clash
DOMAIN-SUFFIX,mcdn.bilivideo.com
DOMAIN-SUFFIX,mcdn.bilivideo.cn
DOMAIN-SUFFIX,szbdyd.com
// adguard
||*pcdn*.biliapi.net^$important
||mcdn.bilivideo.com^$important
||mcdn.bilivideo.cn^$important
||szbdyd.com^$important
// In simple terms
URLs containing pcdn and ending with biliapi.net
Ending with mcdn.bilivideo.com
Ending with mcdn.bilivideo.cn
Ending with szbdyd.com

Explanation of Reasons#

Bilibili's CDN service providers include several types. On the PC web version, we can right-click on the video → Video Statistics to see the CDN information currently being used for our video.
image

Possible CDNs include:

  1. upos-sz-mirror****.bilivideo.com, which appears to be a service provider solution with good quality.

    • Tencent: cos, cosb, coso1, coso2, bos
    • Kingsoft: ks3, ks3b, ks3c, ks32
    • Qiniu: kodo, kodob
    • Huawei: hw, hwb, uphw, js
    • Akamai (overseas): akamai
  2. Self-built CDN (?), with acceptable quality.
    cn-****-dx-v-**.bilivideo.com, which may be one of Bilibili's self-built servers, identifiable by the initials of provinces and cities.

  3. MCDN, poor quality, P2P nodes, implemented by Bilibili to save costs.
    xxxxx(ip address).mcdn.bilivideo.com
    xy99x999x99x99xy.mcdn.bilivideo.cn
    After some research, I only found MCDN on JD Cloud, possibly related to JD Cloud's wireless treasure? It could also be a collaboration between JD Cloud and Wireless Treasure?
    I suspect MCDN includes Wireless Treasure because the IP range is residential broadband.

  4. PCDN, extremely poor quality, P2P nodes, implemented by Bilibili to save costs.
    ********.v1d.szbdyd.com
    At this point, it completely depends on luck. The upstream bandwidth in various regions is uncontrollable, and the node you connect to is uncontrollable in terms of distance, sometimes even making it impossible to smoothly play 1080P.

What we need to do is block those low-quality CDNs, making Bilibili mistakenly think we cannot connect to these CDNs, thus connecting to higher-quality CDNs (which incurs higher traffic costs for Bilibili).
image

Ah, so smooth~!

References#

  1. By the way, my broadband speed is quite good at 1000M, but why does it often buffer when watching Bilibili using Chrome? - V2EX
  2. How can I prevent Bilibili CDN from distributing the mcdn.bilivideo.cn node? - V2EX
  3. Can we turn off the evil PCDN and MCDN? · Issue #654 · xiaye13579/BBLL
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.