• Stars
    star
    518
  • Rank 85,414 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Play videos on Bilibili.com with MPV and Danmaku2ASS

Biligrab-Danmaku2ASS

Play videos on Bilibili.com with MPV and Danmaku2ASS

End-of-life notice

Note: This project is not maintained anymore, and is not guaranteed to work. I will not add new features in predictable future. For any need of improving or fixing, please send me a pull request for me to merge your code in. Thank you for your long-time support.

注:本项目已经停止维护,不保证能用。在可以预见的将来,我也不会再加入新的功能。如果有改进、修复的需求,请发 Pull Request 给我,我会把你的代码合并进来。一直以来,谢谢大家的支持了。

注︰ 此專案不會再繼續維持,不能保證工作。我不會在可預見的將來添加新功能。如果有任何改進、修復的需要,請給我發 Pull Request,我會合併你的程式碼。一直以來,謝謝大家的支援了。

注:このプロジェクトをメインテインしていません、動作は保証されません。予測可能な将来に、私は新しい機能を追加しません。改善や修正する必要がある場合、あなたのコードをマージするために、Pull Request を送信してください。いつもありがとうございました。

Requirements

Note that Libav does not work. See why FFmpeg is preferred.

Example

./bilidan.py http://www.bilibili.com/video/av899574/
./bilidan.py http://www.bilibili.com/video/av314/     # High density comments!
./bilidan.py http://www.bilibili.com/video/av332732/index_7.html # Extreme density!
./bilidan.py http://www.bilibili.com/video/av297197/  # Even Toukome (advanced comments)!

Use option --source overseas if your are outside China. And --source html5 to use the the experimental HTML5 API. Use --fakeip if you can't get valid media URLs due to ip restrictions.

Why Biligrab-Danmaku2ASS?

  • Bilibili uses a Flash-based video player. Flash is unavailable since Chromium 35 to Linux users.
  • Chrome Pepper Flash has a font-related bug on Linux, which causes the whole page crash when Flash tries to render certain CJK fonts so that you have no chance to switch to another font. This caused Bilibili Flash player unusable to Google Chrome users on Linux.
  • Mozilla Firefox users on Linux never receives a newer Flash player than 11.2 from Adobe. It is certain that Adobe has abandoned Flash.
  • Flash consumes too much energy. Flash causes a burning laptop.
  • Experiments show that Danmaku2ASS renders a lot faster than the native Bilibili player and even similar software such as ABPlayerHTML5. Thanks to libass, Danmaku2ASS has passed a extreme density test at 60 fps on a Intel Core i5 laptop.

Tips

  • Use key V to switch comment visibility.
  • Some videos require logging in your account. Import your Cookie at bilibili.tv with --cookie option.
  • If you have difficulties connecting to video server, try --overseas.
  • If your computer is not fast enough, try --mpvflags '--framedrop yes'.
  • Use --d2aflags 'duration_marquee=5' to set comment flow speed.
  • Use --d2aflags 'text_opacity=0.8' to set comment opacity.
  • Try to fast forward or rewind when streaming is stuck, or to tweak cache parameters of mpv.
  • For issue related to URL parsing (especially the experimental HTML5 API), please report directly to Biligrab, the upstream parser: https://github.com/cnbeining/Biligrab/issues

License

Like the original Biligrab, Biligrab-Danmaku2ASS is licensed under MIT license as well. This program is provided as is, with absolutely no warranty.

More Repositories

1

dns-over-https

High performance DNS over HTTPS client & server
Go
1,957
star
2

danmaku2ass

Convert comments from Niconico/AcFun/bilibili to ASS format
Python
518
star
3

VxWireguard-Generator

Utility to generate VXLAN over Wireguard mesh SD-WAN configuration
Python
147
star
4

FaithType

Modify fonts to remove bitmap and disable gridfit for Windows font rendering
Rust
100
star
5

lvdo

Video steganography implementation
C
97
star
6

clover-linux-installer

Install Clover UEFI emulation environment from Linux
Shell
86
star
7

popub

Publish a service from localhost onto your server
Go
85
star
8

midi2ffxiv

Convert MIDI to bard performance of Final Fantasy XIV: Stormblood, featuring multiplayer sync
Go
67
star
9

heif-hdrgainmap-decode

Convert HDR photos taken by iPhone 12 (or later) to regular HDR images
Python
40
star
10

kaigen-fonts

Adobe Source Han font family converted to TrueType format
Shell
39
star
11

fonts.conf

My personal fonts.conf collections
35
star
12

pofwd

The simple & naïve port forwarding program
Go
35
star
13

JPEGreen

Android had a bug causing pictures to be a slightly greener after load & save. This WebApp will simulate this process.
HTML
34
star
14

rime-nihongo-romaji

Rime IME Japanese romaji input engine schema
33
star
15

minecraft-chat-helper

Minecraft chat helper with IME (Chinese, Japanese, Korean) support
Visual Basic
28
star
16

LaTeX-WordFeel

A LaTeX template that mimics Microsoft Word’s look and feel
TeX
25
star
17

telegram-world-tree-bot

Telegram 机器人「世界树」——长夜漫漫,随便找个人,陪你聊到天亮。
Go
25
star
18

wavtool-yawu

Yet Another Wavtool for UTAU
C
25
star
19

userland-ipip

Userland IPIP + IP6IP (6in4) / IPIP6 + IP6IP6 tunnel for Linux
Go
24
star
20

discord-mic-bot

Discord bot to connect to your microphone―and you can have stereo sound
Python
22
star
21

LaTeX-HDU-Bachelor-Thesis

LaTeX template for bachelor thesis of Hangzhou Dianzi University 杭州电子科技大学本科毕业设计的 LaTeX 模板
TeX
20
star
22

redir-from-china

Z2l0IGNoZWNrb3V0IGNvZGU=
19
star
23

libWinTF8

The library handling things related to UTF-8 and Unicode when you want to port your program to Windows
C++
17
star
24

JKSN

JKSN Compressed Serialize Notation -- Yet another binary JSON
C
16
star
25

portknob

Port knocking daemon with web interface
Go
15
star
26

gophertun

Go interface for TUN/TAP and other userland tunnels
Go
15
star
27

clockslow

Trick app to let it think time goes slower or faster, inspired by Speed Gear.
C
13
star
28

openwepro

Open source in-page web proxy software
Python
12
star
29

unzip-iconv

unzip with iconv patch
C
11
star
30

midi-track-merge

Merge multi-track MIDI sequence into a single track for further processing
Python
11
star
31

docker-srs

Docker containerized https://github.com/ossrs/srs
Shell
11
star
32

wifijam

An 802.11n beacon frame transmission program
Python
10
star
33

rust-kissfft

Rust binding for KissFFT
C
9
star
34

mpv-videowall

Play several videos synchronized on a wall with mpv
Python
9
star
35

jack-over-pulseaudio

JACK Audio Connection Kit over PulseAudio
C++
8
star
36

pinyin2xsampa

Pinyin to X-SAMPA converter
C++
7
star
37

kaigen-gothic

懷源黑體(懐源ゴシック,KaiGen Gothic)是一套將 Adobe 和 Google 製作的泛東亞黑體字型「思源黑體(Source Han Sans)」轉換為 TrueType 格式的衍生字型。
7
star
38

MikroTiChestra

There is a beeper in MikroTik routers… You know what I mean.
Go
6
star
39

audio-scripts

Some bash scripts for processing audio files
Shell
6
star
40

tianocore_uefi_duet_installer

A mirror of https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer
C
6
star
41

telegraf-better-ping

A better Ping monitoring plugin for Telegraf / InfluxDB
Go
6
star
42

riscade

A RISC CPU instruction set for academy experiment
Verilog
6
star
43

TermView

An image viewer in an ANSI terminal with 24-bit color support
C++
6
star
44

scripts

Personal scripts collection
Shell
5
star
45

libirc

A Python module that allows you to connect to IRC in a simple way
Python
5
star
46

live-danmaku-hime

A desktop widget to display live comments for various live video broadcast website.
C++
5
star
47

scriptvisor

Simple supervisor utility to allow you start & stop preconfigured scripts in one click
C++
5
star
48

sb-jsfx-plugins

StarBrilliant's JSFX (Jesusonic Effects) audio plugins
4
star
49

midimark

A MIDI to XML (not MusicXML) parser, converter, generater in Go
Go
4
star
50

tornado-simple-http-server

Simple HTTP server serving static files
Python
4
star
51

midymidy-legacy

(Dead) MIDI share website
Python
4
star
52

titlebot

An IRC robot that parses URLs and post the title of that webpage
Python
4
star
53

pmtud-injector

Craft PMTUD response to workaround networks with buggy fragmentation support
Go
4
star
54

gdipp

A mirror of GDI++ project repository (I'm not the owner)
C++
4
star
55

go-sigquit-dump

Go library to dump stack (but do not quit) when Ctrl-\ is pressed
Go
3
star
56

colorspace-routines

Code snippets to compute colorspace conversion matrices
Python
3
star
57

RocaPinyin

A simple Hànzì to Hànyǔ Pīnyīn conversion library, a part of Project Roca
C++
3
star
58

wx-image-viewer

A simple image viewer application written in wxWidgets, demonstrating its image drawing capabilities.
C++
3
star
59

mockup

Some personal web design mockups
JavaScript
3
star
60

mtproxy

(Dead) A transparent download accelerator working as a proxy server
Python
3
star
61

sbfonts

Fonts designed by StarBrilliant
Python
3
star
62

nim-kissfft

Nim binding for KissFFT
C
3
star
63

cgc-go

Cross Goroutine Calls library
Go
2
star
64

bash-cgi

Several CGI scripts to show the beauty of Bash programming
Shell
2
star
65

gnucash-csv2html

Convert CSV files exported by GnuCash to HTML format
Python
2
star
66

ss2qr

Convert ss configurations among JSON, URI, QR Code formats
Python
2
star
67

bpm-counter

Beats per minute counter by way of keystrokes (Mirror of a Google Code project)
Python
2
star
68

ircbindxmpp

A python program that forwards messages between IRC and XMPP
Python
2
star
69

dogefs

Wow! Such filesystem! Very useless!
C++
2
star
70

docker-ovpn2ss

A Docker image that converts OpenVPN to SS
Shell
2
star
71

geodns-injector

(Internal Utility) Fill GeoDNS data to query DNS for results near a certain country
Go
2
star
72

xuming

Too young, too simple, sometimes naïve.
Go
2
star
73

ltowrapper

Wrap calls to GCC toolchain to enable Link Time Optimization (LTO) duration compilation
Shell
2
star
74

rime-cangjie-zh_hans

Rime IME Cangjie schema with Simplified Chinese dictionary
Shell
2
star
75

simibot

(Dead) An IRC chatbot using SimSimi's API
Python
2
star
76

EADDRINUSE-go

Simple Go library to detect "Address already in use" for net.Listen, a workaround of bad encapsulation design of Go 1.x
Go
2
star
77

python-asyncore-epoll

(Dead) Python AsynCore with epoll support
Python
1
star
78

sb-ladspa-plugins

StarBrilliant's LADSPA audio plugins
C
1
star
79

wavegen

A bash script generating raw sound file at a specific frequency and shape
Shell
1
star
80

mididump

Dump MIDI to XML for human reading
Python
1
star
81

logbot

An IRC logging robot
Python
1
star
82

timidity

Timidity++ MIDI synthesizer with some patches.
C
1
star
83

sbmips

Naïve MIPS32-like CPU design with pipeline on a Xilinx FPGA
Verilog
1
star
84

ProgrammingWithXCB-zh

Basic Graphics Programming With The XCB Library Chinese version.
1
star
85

lab

Star Brilliant's laboratory
Python
1
star
86

master-peng

Network condition simulator (work in progress)
Go
1
star
87

ParTImm

(WIP) An unfinished C++ port of ParTI
C++
1
star
88

yats

(Dead) YATS Aren't SOCKS -- Yet Another Tunneling Service
Python
1
star
89

linux-copy-image

Copy a image into your Linux clipboard
Python
1
star
90

dsdsynth

A simple hardware Delta-Sigma wavetable synthesizer
Verilog
1
star
91

docker-doh-infrastructure

(Internal Use) Dockerized DoH infrastructure
Dockerfile
1
star
92

sina-live-fetcher

Fetch HTTP live stream URL from Sina Live Game Broadcast
Go
1
star
93

dotfiles

My /home/brilliant/.dotfile
Vim Script
1
star
94

COMP5411-Demo

Temporary repository for demonstrating COMP5411 course project
1
star
95

chatlist

An XMPP chat program that bounces messages to all its subscribers
Python
1
star
96

sina-video-uploader

(Dead) Uploader for Sina Video
Python
1
star
97

roofbench

Benchmark utility for CPU FLOPS, core latency, and memory bandwidth
C++
1
star
98

shared-server-management

A simple interface for users on a shared server to manage their own services
Shell
1
star
99

gurgle

Gurgle (咕嘟) instant messaging protocol design proposal
1
star
100

dirdiff

Compare two directories, print file names with difference
Python
1
star