This is a little utility I wrote back when I had to produce some Blu-ray subtitles for a documentary. The generated files can be used by tools like BDSup2Sub++.
You can either use Meson (see the Meson documentation):
meson builddir
ninja -C builddir
Or you can build it without using a build system:
cc *.c -o ass2bdnxml $(pkg-config --cflags --libs libass) $(pkg-config --cflags --libs png) -lm
(Depending on your platform, you may have to omit -lm
)
ass2bdnxml
will write its output to the current working directory. Simply invoke it like this:
ass2bdnxml ../subtitles.ass
The following optional arguments are available:
Option | Effect |
---|---|
-t --trackname |
Sets the human-readable name of the subtitle track. Default: Undefined |
-l --language |
Sets the language of the subtitle track. Default: und |
-v --video-format |
Sets the video format to render subtitles in. Choices: 1080p, 1080i, 720p, 576i, 480p, 480i Default: 1080p |
-f --fps |
Sets the video frame rate. Choices: 23.976, 24, 25, 29.97, 50, 59.94 Default: 23.976 |
-d --dvd-mode |
Applies a contrast change that hopefully improves subtitle appearance with the limited resolution and color palette of DVD subtitles. |