Skip to main content

将 B 站弹幕转换为 ASS 弹幕

Project description

biliass

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

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 convert_to_ass

# xml
convert_to_ass(
    xml_text_or_bytes,
    width,
    height,
    input_format="xml",
    display_region_ratio=1.0,
    font_face="sans-serif",
    font_size=width / 40,
    text_opacity=0.8,
    duration_marquee=15.0,
    duration_still=10.0,
    comment_filter=None,
    reduce_comments=False,
)

# protobuf
convert_to_ass(
    protobuf_bytes, # only bytes
    width,
    height,
    input_format="protobuf",
    display_region_ratio=1.0,
    font_face="sans-serif",
    font_size=width / 40,
    text_opacity=0.8,
    duration_marquee=15.0,
    duration_still=10.0,
    comment_filter=None,
    reduce_comments=False,
)

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.1.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distributions

biliass-2.1.0-cp39-abi3-win_amd64.whl (951.9 kB view details)

Uploaded CPython 3.9+ Windows x86-64

biliass-2.1.0-cp39-abi3-win32.whl (871.8 kB view details)

Uploaded CPython 3.9+ Windows x86

biliass-2.1.0-cp39-abi3-musllinux_1_2_x86_64.whl (1.4 MB view details)

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

biliass-2.1.0-cp39-abi3-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ i686

biliass-2.1.0-cp39-abi3-musllinux_1_2_armv7l.whl (1.4 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARMv7l

biliass-2.1.0-cp39-abi3-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARM64

biliass-2.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

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

biliass-2.1.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.4 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ s390x

biliass-2.1.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.4 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ppc64le

biliass-2.1.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ i686

biliass-2.1.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARMv7l

biliass-2.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARM64

biliass-2.1.0-cp39-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.9+ macOS 11.0+ ARM64

biliass-2.1.0-cp39-abi3-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9+ macOS 10.12+ x86-64

File details

Details for the file biliass-2.1.0.tar.gz.

File metadata

  • Download URL: biliass-2.1.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for biliass-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c9548564e7f4efa0e75610cc2a0bf31e4d716d906141155ebf670e7c7192e1bf
MD5 5136b2072a4b22b75ca00344b95fba88
BLAKE2b-256 46e08ef67c46c28ee8587a849209e191f5b88eb19c9bf31f73cdd35222eec065

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-win_amd64.whl.

File metadata

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

File hashes

Hashes for biliass-2.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6625661a040235e51b52376a80130b4c032f20ce11246ea1612fde052356993a
MD5 cda2e0d8a5068e422405db9e374091e9
BLAKE2b-256 e8a8d6d800059df095389743f13f6437b7bd58ef06bb273b751a98c1ccc436c0

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-win32.whl.

File metadata

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

File hashes

Hashes for biliass-2.1.0-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 d60bef8219fe1a5de2c69c1f6122b351ab55ca929179346e54b42afd1839914e
MD5 f676504067ffda0aa965bfb3bd50ebb2
BLAKE2b-256 603bbb10bde29cdf8c590d33c3500c2ff8417cb5d8d4e2d6e5981375d10984ce

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9f1fb880249f02e234f277dad52401ef3c23237c74b994bd720a4819a76a2bb3
MD5 6afd82d63e792c15b6ac83491748d5a9
BLAKE2b-256 3f89eda0a77f277cbc8703a3f1a5291cfe065000bed8a760339c8327ce69188f

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5f68abd8f5e22c1c4458ebaf82cea626e4dbf720db155e72aa70f3e13da782dc
MD5 47a85e8a4cb9fd0f2f7f500a1bca9062
BLAKE2b-256 c02c1cc63ff4e4ba925655b033f271e299f8e96af8807a0ee5dae8aba56c36df

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 6e7f4f0082c5918195a4ff5303564e7c9047addc05e460916439bb39f528e335
MD5 ee820d52526c175df0714fc2e62b06a0
BLAKE2b-256 0c747ef1404c05e1ed7dd18e40242399cf140eab1bcd2aec11e30271a816b4b0

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5e7205157a68ba0c1e2820cdc4d109b5b07a5bbef3dba549067dd144ea57b9f7
MD5 d88ba90f3ce254fdf8bb8a4b0892e80b
BLAKE2b-256 81972d83e1f392731a4c402898da96c4458192c84e3ceeced2c3a308519670d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 693e9b0577a47195276520261500485c7d5b230abdecfd5dca543aa0cdb0914f
MD5 ad484a38cbe3f37c98cba991cfeea2bd
BLAKE2b-256 d07e77627edb19c0c7079a4fab19c62539770d4dde9350b0b096670ad466931f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4a4de37e1520ef554778631db65cb2be3b38129d9ab59af2cf7966c3b1d7dc6d
MD5 826aa9db3cc9fdf846d463bae684a55e
BLAKE2b-256 d4aff03a3b7c43c4c5ae8a98787df006ead31de15d00db83f031c21be5a72118

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 046d0bdc606e1cd72b74fd50191e227b910acea613063d5f3d118e8fb784f40c
MD5 4238f378d37adaa7f05f4372f818cf54
BLAKE2b-256 de47937dc2a15b90eef7877db8be0f7592d79b1751df21f288f6d48a4de3d4db

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e740adfaac73fc56d4cfed04e450af5f52028e12be49b73f9823f5ef827960ff
MD5 404b189a3a5d417465f82f85a3181741
BLAKE2b-256 e455c66a004730b1f85c947d460dabd305d5de0dfacf11f593f1142a627134b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 918bdd5426973a35e11acd84da4963a8ba2462c986d3769943ef00f3dbb6698a
MD5 bf97692dbbd2d9363d033e3092d645da
BLAKE2b-256 d7269e1ce4dee4bd4bc3a39b819a40b6c01333c2fe7789a9dd1ff952db616646

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3155e6db4b67cf6df3bcb1c8621504a7c197204893b85c08c8cb4d2472774d32
MD5 f22707a79c6d4235365b9a02d55ba264
BLAKE2b-256 3fb4f3d1e3b90231faa07d75f15c6d1c9326bd4908a57d90285c2b221cad894c

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b594f851aef082aa821aa11b63b0037ed97c6f6dd3dcd0ede2cc7ddcc0e61086
MD5 a36c75b8b5cb395ab6e3d6ee19cc361a
BLAKE2b-256 3f73e1904ee2fc74da27a92ebc9901e930ac8172b94a7136b72b83406d8c063a

See more details on using hashes here.

File details

Details for the file biliass-2.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for biliass-2.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8f834fc8dabcec160b7af5adb7c1a8700fa5462d07732273c930217e3d5f8a9a
MD5 80d018d408b4311c20bd7bc967829b2d
BLAKE2b-256 cc8de777d7090ba8d15f8cdef4bf8b1eab4fd5551d6ad70647cb01a0226391e6

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