Skip to content

Instantly share code, notes, and snippets.

@mebubo
mebubo / README.md
Created October 20, 2016 18:43 — forked from jareware/README.md
Conversion script between the TTML & SRT subtitle formats

premiere-subtitle-convert

Conversion script between the TTML & SRT subtitle formats. This is particularly useful with Adobe Premiere, as it doesn't understand the SRT format (which is joyously simple and interoperable). TTML-XML is probably the most straightforward subtitle format it does understand, hence this tool.

Note that due to the simplicity of the SRT format, this conversion is extremely lossy for all the bells and whistles supported by TTML. Not like you'd want fixed-pixel font sizes etc in your subtitles anyway, but you've been warned.

#!/bin/sh
DEVICE=sdf
mkfs.vfat -n multipass01 /dev/$DEVICE1
mount /dev/$DEVICE1 /mnt/
grub-install --no-floppy --root-directory=/mnt /dev/$DEVICE