Utility for Y'CbCr ColorMatrix conversion of ASS Subtitles
If you are smart and know about ASS subtitles you are probably wondering what Y'CbCr has to do with ASS. As a matter of fact ASS uses RGB hex for color representation.
The problem is some subtitles renderers (VSFilter) on Windows decided it was
too stupid to render the RGB directly (don't even ask about it). So they
started doing a R'G'B' ->(BT.601) Y'CbCr ->(BT.601) R'G'B'
chain of
conversions.
The problem is some fansubbers started to actually author content for these broken renderers and the result is you get broken colors on subtitles in the video players that are actually getting it right.
This tool is an attempt to fix this problem. Using mkvextract/mkvmerge and some matrix multiplications it generates a new ass file where the colors passed through the following conversions:
R'G'B' ->(BT.601) Y'CbCr ->(BT.709) R'G'B'
Make sure you have mkvtoolnix (mkvmerge and mkvextract) utilities installed and in your path. For example, on OSX and homebrew it's as simple as:
brew install mkvtoolnix
Install the Ruby Gem:
[sudo] gem smart_ass
This is really minimal. To process mkvs:
smart_ass --type mkv path/to/movie.mkv
To process .ass scripts:
smart_ass --type ass --suffix bt709 path/to/script.ass
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Look for pigoz on irc.freenode.net.