Skip to content

Subtilte Convert Utils - ass2srt vtt2bcc srt2bcc ass2bcc and more | 字幕格式转换

License

Notifications You must be signed in to change notification settings

sudoskys/subtitle_utils

Repository files navigation

subtitle_utils

cover

Python Download

Subtilte Conversion Utils - ass2srt vtt2bcc srt2bcc ass2bcc and more!

Install 🥽

pip install -U subtitle_utils

Usage ☕️

from subtitle_utils import get_method, show_available, srt2bcc

print("Available methods:")
print(show_available())

with open("test.srt", 'r') as file_io:
    test_result = get_method(method="srt2bcc")(content=file_io)
    print(test_result)

_result = srt2bcc(content="1\n00:00:00,000 --> 00:00:01,000\nHello World")
print(_result)