youtube-ass
youtube-ass copied to clipboard
Converts YouTube XML Annotations to ASS subtitles
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