Skip to main content

将 B 站弹幕转换为 ASS 弹幕

Project description

biliass

PyPI - Python Version pypi PyPI - Downloads Build Status LICENSE Gitmoji

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,
)

# 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,
)

TODO

  • 导出 bilibili 网页上的弹幕设置,并导入到 biliass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biliass-2.0.0b1.tar.gz (29.1 kB view details)

Uploaded Source

Built Distributions

biliass-2.0.0b1-cp39-abi3-win_amd64.whl (868.0 kB view details)

Uploaded CPython 3.9+ Windows x86-64

biliass-2.0.0b1-cp39-abi3-win32.whl (788.1 kB view details)

Uploaded CPython 3.9+ Windows x86

biliass-2.0.0b1-cp39-abi3-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ x86-64

biliass-2.0.0b1-cp39-abi3-musllinux_1_2_i686.whl (1.3 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ i686

biliass-2.0.0b1-cp39-abi3-musllinux_1_2_armv7l.whl (1.3 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARMv7l

biliass-2.0.0b1-cp39-abi3-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARM64

biliass-2.0.0b1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ x86-64

biliass-2.0.0b1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.3 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ s390x

biliass-2.0.0b1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ppc64le

biliass-2.0.0b1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARMv7l

biliass-2.0.0b1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARM64

biliass-2.0.0b1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.1 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.5+ i686

biliass-2.0.0b1-cp39-abi3-macosx_11_0_arm64.whl (962.4 kB view details)

Uploaded CPython 3.9+ macOS 11.0+ ARM64

biliass-2.0.0b1-cp39-abi3-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9+ macOS 10.12+ x86-64

File details

Details for the file biliass-2.0.0b1.tar.gz.

File metadata

  • Download URL: biliass-2.0.0b1.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for biliass-2.0.0b1.tar.gz
Algorithm Hash digest
SHA256 ac6b29209b585c584234964a56b097f57dafb8edc00366de9e6f5e3d76121b99
MD5 f603a9a28c576f3a1fdd4f61953b8c3b
BLAKE2b-256 079eeda0c9f471219deaa9e0091dd7e0b45c89e7dae8fbd09f78d2c2c9fef9b3

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: biliass-2.0.0b1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 868.0 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5e9b1048f2a6211d14ef6c1384d5927d0adfe2065f73999e9df6dd966d0846da
MD5 1ade1d0b896b3f0970aab0934b7099fb
BLAKE2b-256 9e7f5878294147b8f53e04b99718a0adca4294e0299dbf93c221ff7261ce1f6e

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-win32.whl.

File metadata

  • Download URL: biliass-2.0.0b1-cp39-abi3-win32.whl
  • Upload date:
  • Size: 788.1 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 681b8b7abbdd2f6a0987428c856c0cf7e40f38996097017e9c4d0efdda056961
MD5 d0dc6ef3482a1e0abf7275ae5cb87f2d
BLAKE2b-256 87e59e48cd52e138a5d8b7b298acce5b0ff057b05d31864420a99fe48f36a272

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ba997ff89cbc908c7bc0dfdb75b6097b25c2c0111dd14cbe3977eaec7945b461
MD5 2ae21988227b2398b4edf479dcaa15a3
BLAKE2b-256 e25cdd43ba89e8ee6c6b2c776f57ee66d587b18903a4ff7d79c8f759dff454d7

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 7ef20339c0d21646542178cac04063dfd5840f978cb69f4683d0f448428bd71a
MD5 297a72b5049e5c6f2ca7c94d4ba17135
BLAKE2b-256 6308c61b5cbfaee3f1d44bde4dfbb42ae2b3d0219ab0b739f374898bb5895833

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 127834cd1d7b40464f662864e4b414c594f1d9dba583dfccd09f5a5bae61c9f3
MD5 1651f34e12b1d87c3cc4b6d61ed01df4
BLAKE2b-256 67989d69f31bf546884f40cc23d66b498c10c8eff8a0040c37d74e544223f6d4

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d1e238b9f78c48586a00d9710a2ec5c72af361591b41156d28197a4eac410084
MD5 ac0fe935333d1a8592294b064b25901a
BLAKE2b-256 39d334c8cf91606e2e4a300e5070c3907a0817ab274e8121a8898c9441f6fa7b

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 284fefafe9d1f71a701b9852c2751b6fc851f5534abcec4ea3c5fc158c9599da
MD5 bda384c334b13f72265735465ce0343b
BLAKE2b-256 aba9efa8049f1236d7fba2f38f02b309c082320bbdd8e9db6a547557061fcf91

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b04cbe3b3ce4a7129ba77e9b38983595e0a3dca6a0a608c43dff55cbb7f1d92b
MD5 8de90a987a7aa7fa715ebdbddba15739
BLAKE2b-256 81545709408fb872715c45ac82151f805211537f4a99b0090d6335d8bc46c466

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 1e5bc963e5d608bb661f6e5f3eb0ba309ec8be4c62ce09297eaf3f83bcec5465
MD5 7599b819916cf2420adcde63284ee6f6
BLAKE2b-256 8efb502380284ce4ebbc04f57c0fb3ec4704181dd4f3fe9fe11b47066d2cdc6e

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ce705dfcc00c46b031d51f9d8c73020f9b406a3c65dad9ac04e83f8e1649e6c6
MD5 1145bb201338f6f596ec8e65a071e228
BLAKE2b-256 31b90341ebbbb45e526cc98956479a2801f194f6be4ad896d8b1cd15492ef734

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 80eaa19f4acc037146e1452fa81f920d614e983988b34e9f0cc5ec55032c1bd7
MD5 aa2a7fde15d9acb343ca7858991af98f
BLAKE2b-256 e5e12d9207e42529b473fb8e0aefe3e5baa2912013fde8b6989928d1d1f0fdf1

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 26708e67df2ca3820e4991f122e2ae30e5dcff1d9786a885d263c379eb3d4805
MD5 c6de6d50f4ea5e1d24123d89a0972357
BLAKE2b-256 f79176bcf089e64d7b28932a1f0becdad7ac3c49836156a87a7415973d2016ca

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 47255eee57ee692f8c9a2ad821111fa392ce7c4677536afe5845f27209ea48ae
MD5 76f0520e42cfeb2868ce86664f647132
BLAKE2b-256 273a7a94da44e2e87164ec4b704fdc01aff656e4ac547bffe9bf3898b194ed65

See more details on using hashes here.

File details

Details for the file biliass-2.0.0b1-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for biliass-2.0.0b1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ff42e47e5805d830f29068e297aa9658c212faf9d43ae65bd4cb888ff8008923
MD5 ff2bbf44f6205bf8142d6a3157982a03
BLAKE2b-256 ca642aecfe4c3103ca97e42c896c6b01d7e14f306a4e760070a6d3c872112bd9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page