A .vtt to .ass and .srt converter
Go to file
x3 a5d9f6d1bd
First
2024-10-27 22:22:29 +01:00
src First 2024-10-27 22:22:29 +01:00
subm First 2024-10-27 22:22:29 +01:00
.gitignore First 2024-10-27 22:22:29 +01:00
.gitmodules First 2024-10-27 22:22:29 +01:00
Makefile First 2024-10-27 22:22:29 +01:00
README.md First 2024-10-27 22:22:29 +01:00

README.md

vtt2ass-cstyle

A .vtt subtitle converter to .ass and .srt.

Building

Clone the repo with

git clone --recurse-submodules https://github.com/moex3/vtt2ass-cstyle

Make sure the required dependencies are present: harfbuzz and freetype2.

Build with

make

By default it will build a debug build.

To generate both .srt and .ass subs in one run:

./v2a srt --output out.srt ass --output out.ass --width 1920 --height 1080 --font ~/.local/share/fonts/ipaexg.ttf  input.vtt

This will generate out.srt and out.ass with the specified video dimensions, using the ipaexg font from the the input.vtt file.

Features

  • Handle ruby tags for srt by enclosing them in parenthesis, and by positioning the text correctly for ass. NO vertical ruby for now. srt ruby ass ruby
  • Basic vertical text support for ass subtitles.
  • Bold, italic and underline support.

Missing features

  • No overlap detection.
  • No region support.
  • The positioning can be buggy (I can never get that right).
  • Not tested with real word subtitles. If you want to use it, and it fails on that subtitle, make an issue.
  • I wrote the vtt tokenizer myself, not according to the spec.
  • Codebase quality. Enough said.