将 B 站 XML 弹幕转换为 ASS 弹幕
Project description
biliass
biliass,只是 Danmaku2ASS 的 bilili 与 yutto 适配版
原版:https://github.com/m13253/danmaku2ass
仅支持 bilibili 弹幕,支持 XML 弹幕和 Protobuf 弹幕
Install
pip install biliass
Usage
# XML 弹幕
biliass danmaku.xml -s 1920x1080 -o danmaku.ass
# protobuf 弹幕
biliass danmaku.pb -s 1920x1080 -f protobuf -o danmaku.ass
from biliass import Danmaku2ASS
# xml
Danmaku2ASS(
xml_text_or_bytes,
width,
height,
input_format="xml",
reserve_blank=0,
font_face="sans-serif",
font_size=width / 40,
text_opacity=0.8,
duration_marquee=15.0,
duration_still=10.0,
comment_filter=None,
is_reduce_comments=False,
progress_callback=None,
)
# protobuf
Danmaku2ASS(
protobuf_bytes, # only bytes
width,
height,
input_format="protobuf",
reserve_blank=0,
font_face="sans-serif",
font_size=width / 40,
text_opacity=0.8,
duration_marquee=15.0,
duration_still=10.0,
comment_filter=None,
is_reduce_comments=False,
progress_callback=None,
)
TODO
- 导出 bilibili 网页上的弹幕设置,并导入到 biliass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
biliass-1.3.7.dev1.tar.gz
(24.1 kB
view details)
Built Distribution
File details
Details for the file biliass-1.3.7.dev1.tar.gz
.
File metadata
- Download URL: biliass-1.3.7.dev1.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
60e9e14547c9e6038209ccb96914ce389224b45ae8e957f7c2f977d271513c37
|
|
MD5 |
70361141055d191fea13a3fc2dd7a3da
|
|
BLAKE2b-256 |
2c089bf37684cd012d9af4ce9b91870d80e65fbdc05000dbbe9bf4a690770fe2
|
File details
Details for the file biliass-1.3.7.dev1-py3-none-any.whl
.
File metadata
- Download URL: biliass-1.3.7.dev1-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2a9283a87c0368d24f2ad82e1c5a66a9a24ec76cdf4f1b48ba3ee1a103f98b85
|
|
MD5 |
a62dbc0aa7f848ee1dc25519a57d51d2
|
|
BLAKE2b-256 |
9af6658cb2aec680731261e82944ab1e3608da0ad00a3886c14d3343ea64b38d
|