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

Uploaded Source

Built Distributions

biliass-2.1.1-cp39-abi3-win_amd64.whl (752.4 kB view details)

Uploaded CPython 3.9+ Windows x86-64

biliass-2.1.1-cp39-abi3-win32.whl (684.3 kB view details)

Uploaded CPython 3.9+ Windows x86

biliass-2.1.1-cp39-abi3-musllinux_1_2_x86_64.whl (1.1 MB view details)

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

biliass-2.1.1-cp39-abi3-musllinux_1_2_i686.whl (1.1 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ i686

biliass-2.1.1-cp39-abi3-musllinux_1_2_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARMv7l

biliass-2.1.1-cp39-abi3-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARM64

biliass-2.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (959.7 kB view details)

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

biliass-2.1.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.0 MB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ s390x

biliass-2.1.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (981.6 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ppc64le

biliass-2.1.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (916.1 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARMv7l

biliass-2.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (920.1 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARM64

biliass-2.1.1-cp39-abi3-manylinux_2_12_i686.manylinux2010_i686.whl (942.7 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.12+ i686

biliass-2.1.1-cp39-abi3-macosx_11_0_arm64.whl (848.4 kB view details)

Uploaded CPython 3.9+ macOS 11.0+ ARM64

biliass-2.1.1-cp39-abi3-macosx_10_12_x86_64.whl (886.1 kB view details)

Uploaded CPython 3.9+ macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: biliass-2.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8474dc6bb8c59457aa86a747df016f333d78150dd4653b23a69d747680d27f25
MD5 467205a885b8cd4ff1eb69b99232a0ae
BLAKE2b-256 30f418a6a150c2c427420d063c9e951fdc72cb533289273627b06579f70fc421

See more details on using hashes here.

File details

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

File metadata

  • Download URL: biliass-2.1.1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 752.4 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.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3fc2b3bb9f1878bff3bc9bc143d97302e281d87f92d72d57803ae7593a08cda8
MD5 3f9da21e01c1e048bdec3fac04cc5b97
BLAKE2b-256 95b00536c7aa229aa477b951bd3fd7b0b4e3750dbec197b2e404d6ece4c30a50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: biliass-2.1.1-cp39-abi3-win32.whl
  • Upload date:
  • Size: 684.3 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.1-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 1020fb060d9097d5dbf0786f231e55ee07d3f27c6c7e110e197f5538b66e1772
MD5 0b1e1f39b649c7ddd3eaf6df0db252c7
BLAKE2b-256 93453043159d60968ee5bc0042e451cba40fad04aaa06defdd75bbf2f8f51fc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 08d5cd5eb6df4f602cf3dfd03f3e242ff6343ebc49f3d0f4e7172cb3afeca002
MD5 2bd920b05be5d826c1eaf6c894a0eb0c
BLAKE2b-256 0cff41891a6dd60a30f4968e69a421362c799bac265551e9e5759cdfc6621022

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ddce075272b618666babe05222c71517c74b5260dca28d46584ec0e1cac82ba1
MD5 137999775b822012d56055481d408a2d
BLAKE2b-256 4368885f28aa9f85212e3b77575eaa637f915f7efc4aa33e60ab22604690c748

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 f91e1473db178a39cb5bfc1fd15c2332d590cbd4656d151173ee34364b670dfe
MD5 23469066f373d58014ce0e1e3564f7c0
BLAKE2b-256 0ed261c666062ac521fd192f7ea9d5995004c9156aa88fc3babc64a27d3c2839

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 20c3d3e5e073127541456e36c565dc786934990f153bb7e6c2516a11a78ac528
MD5 8693a6a57e864be8d244f9da2b515d7f
BLAKE2b-256 1d27d51a858a56a52845d29bbb7baf08c6ef49a1c1f328df733ddd432a0c2006

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22bb88ef27762046a69edfa14d19af80e5fe6a58ccb774e054e7d4152c3e9e8a
MD5 23ed74410f658a27f284779d08495199
BLAKE2b-256 0d9e0204d587c750ff8d07c15261f64cd55f60eed6e1081055794fcd62bda7ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a61b8caaa8fa0eb0a324d8c28bc4e6dc2bf9ad5fcfb057949ef86768f6cc9ac5
MD5 4ed68619c7b432ca6e53d74943bb4ff4
BLAKE2b-256 b17d44911a1aded6377bac735d9380d3dedc98054dba2cd57a0c102f326fdbf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 8b73118f32f598a48fd32fcf3a4b5fc29e28f0d6506cb0a4f0391c89d78e32e0
MD5 10d30643c68a86b01f6b9ef6c4ff262b
BLAKE2b-256 0871518ba09562848bce4755c3a22e291039e422dacef289afde5d3bbe0f3428

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 587df428f550e256da5c6c602dbd29ff2e2cb04690d3afb23d0dc4d1b9eed528
MD5 945ed63fb68722e24cfc169d46c1f8b4
BLAKE2b-256 8977f952454b6878fb53d01087ad0f66bb57e369991b8aaed5d5d0a3e6077f49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d8a15a116caa38ba36c0cb496b6ce6493ed3f5714945a8653c77892179403d6e
MD5 e632f804ff7b607c9043cf806195a9ce
BLAKE2b-256 5ef8bf548110f44d9c9d4fe9ff89856a2c18516a3700a7d1da77b1b9d2b6e06c

See more details on using hashes here.

File details

Details for the file biliass-2.1.1-cp39-abi3-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 6cf39dcca998902bd8af4454fe52246803bd4668bb3a7e71acc2915ee1a086d5
MD5 61fd1f313adb5a959f1c77ea67dfb2c5
BLAKE2b-256 88820f4394aad61768e0f7acf3ec3ce21bcbaf89d6a6d74352bb96d7027b479d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 784c5bcee659445c6b5555ec9a183efbdeb4384aaac8c042415c94c2ba5dfe64
MD5 c0fe0c8a12e7f22efe30ca3669c3adc3
BLAKE2b-256 80aa27c7aa87ffc55fbd8d48ccb6fe82b1d41d09d9917a0e082edf7d75865ca1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biliass-2.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9b630f42756e5bf1703845a1c3cad0ab8badfc5f72bb33c2d29ba59041cdb721
MD5 a44f26ffce52d989c06919decf2917f4
BLAKE2b-256 77bacac81e507b7cdbaec4fbf660466d1bf3bfb7fea0d75c74a96f2b6270427e

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