|
字体封入 ass 字幕可以参考 ass specs,里面介绍了实现的原理
SSA’s font and picture file embeddeding is a form of UUEncoding.
It takes a binary file, three bytes at a time, and converts the 24bits of those bytes into four 6-bit numbers. 33 is added to each of these four numbers, and the corresponding ascii character for each number is written into the script file.
The offset of 33 means that lower-case characters cannot appear in the encoded output, and this is why the “filename” lines are always lower case.
Each line of an encoded file is 80 characters long, except the last one, which may be shorter.
If the length of the file being encoded is not an exact multiple of 3, then for odd-number filelengths, the last byte is multiplied by hexadecimal 100, and the most significant 12 bits are converted to two characters as above. For even-number filelengths, the last two bytes are multiplied by hexadecimal 10000, and the most significant 18 bits are converted to three characters as above.
There is no terminating code for the embedded files. If a new [section] starts in the script, or if another filename line is found, or the end of the script file is reached then the file is considered complete.
喵萌以前这么做过,后来应该在 BDRip 中抽出来了
主楼其实一直说的是 mkvmerge 的问题,和字体封入 ass 没啥关系
|
|