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 content uploaded by smaller creators. The experience of dragging the progress bar to play is very poor. 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. Using any method you are familiar with, block the following 3 domain suffixes:

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 the Reason#

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 used by 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 (?), quality is acceptable.
    cn-****-dx-v-**.bilivideo.com, which may be one of Bilibili's self-built servers, where you can see the initials of the province and city.

  3. MCDN, poor quality, P2P nodes, set up by Bilibili to save costs.
    xxxxx(ip address).mcdn.bilivideo.com
    xy99x999x99x99xy.mcdn.bilivideo.cn
    After some searching, I only found MCDN on JD Cloud, possibly related to JD Cloud's wireless treasure? It may also be a combination of 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, set up 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 and its distance from you are also uncontrollable. Sometimes, it may even be impossible to play 1080P smoothly.

What we need to do is block those low-quality CDNs, making Bilibili mistakenly think we can't connect to these CDNs, thus connecting to higher-quality CDNs (which are more expensive in terms of 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 we prevent Bilibili's 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.