Skip to main content

将 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


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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biliass-1.3.2-py2.py3-none-any.whl (25.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: biliass-1.3.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.4

File hashes

Hashes for biliass-1.3.2.tar.gz
Algorithm Hash digest
SHA256 12c75e01e7d04ca256723a8967b9b99f81848df8889cd44b6d9d4f0c0a5c7560
MD5 e5c404188df133cfc2b7208eff4caad1
BLAKE2b-256 44c59346903972357cf871249c079d0b65d4484c8669bf038b9ff0207c9da921

See more details on using hashes here.

File details

Details for the file biliass-1.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: biliass-1.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.4

File hashes

Hashes for biliass-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 02ee054835a2d35f53cb67ae1e15724979f6ebfcca35a77e254837e89c3a914b
MD5 9d9fe326f8b55f0ba8b3c7dd3bb31bbf
BLAKE2b-256 4740e7c275ba18418098a3f2722a6b213e0a1ad0a44534d470947441653bdd69

See more details on using hashes here.

Supported by

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