Skip to content
Converts YouTube XML Annotations to ASS subtitles
Python
Branch: master
Clone or download
Latest commit 315c70d Mar 31, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README
youtube-ass.py

README

Code to download and convert Youtube XML annotations to ASS format
http://en.wikipedia.org/wiki/SubStation_Alpha#Advanced_SubStation_Alpha

Details about the ASS file format can be found at:
* http://www.matroska.org/technical/specs/subtitles/ssa.html
* http://moodub.free.fr/video/ass-specs.doc

This conversion script tries to maintain:

* Correct timing and text
* Font colour and background colour (can be improved)
* Positioning and width of subtitle text around the video

Positioning is hard to translated into ASS format because it uses Margins
instead of x/y and there's very little control over vertical spacing.

TODO:
* Support languages other than English
* Try to use ASS Picture Event lines to create transparent text boxes
* Use ffmpeg to mux the audio/video/subtitle streams into mkv
* What about automatic captions?
* More that I'm forgetting.

Released under the CC-0 License

No code references were used while writing this parser, hence it's free of
derivative licensing problems.

Created for use by youtube-dl:
* https://github.com/rg3/youtube-dl/issues/90
You can’t perform that action at this time.