将 B 站 XML 弹幕转换为 ASS 弹幕
Project description
biliass
Danmaku2ASS 的 bilili 与 yutto 适配版
原版:https://github.com/m13253/danmaku2ass
支持 XML 弹幕和 Protobuf 弹幕
Install
pip install biliass
Usage
# XML 弹幕
biliass danmaku.xml -s 1920x1080 -o danmaku.ass
# protobuf 弹幕
biliass danmaku.protobuf -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,
)
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.1.tar.gz
(11.9 kB
view hashes)
Built Distribution
Close
Hashes for biliass-1.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17796327ead1d9182c9f5395610f336fade16c2ba2df6c002c0c3fbce462ebf2 |
|
MD5 | cb8da6e8af3ee7165a9ea92107650b41 |
|
BLAKE2b-256 | 8d69c8f20b6d364b894c46cb3669c7da778f293b4d04c89c5482fb6388230c6b |