如果我把字体文件直接拖进MKVToolNix混流字幕出来的也是font/otf和font/ttf,不知道相比于application这 ...
就像 @joker2000 说的那样,mkv 封装设置的 mime 类型和字体本身没有关系。你应该是把我这个软件生成的已经嵌入字体的字幕直接加载到 mkvtoolnix 里面了,这样的话你在附件那栏看到的字体实际上是内嵌在字幕中的,mime 已经在加载进来的时候由 mkvtoolnix 设置好了
sommio 发表于 2023-4-18 15:23
另外不建议封 OpenType 字体,目前只有基于 harfbuzz 的 libass 可以正确渲染它
这同时也是不符合ass sp ...
This section contains text-encoded font files, if the user opted to embed non-standard fonts in the script. Only truetype fonts can be embedded in SSA scripts. Each font file is started with a single line in the formatas
ass-spec 裡的這句話,是說字型檔案可以直接轉換成純文字,然後直接放在 " .ssa/.ass" 檔案裡面
也就是「把字型內嵌進字幕裡」,喵萌曾經有做過這種字幕檔
ListAssFonts 當初也為了這種字幕檔,開發了從字幕檔案反向還原出字型檔案的功能
孤雨独火 发表于 2023-4-19 02:07
我认为楼主的思路不合理,既然选择了子集化这么“前沿”的东西还考虑“上古”设备(硬盘机蓝光机)的兼容 ...
如果是图形字幕是不是还要从零开始自己做,如果没有快捷的转换方式那真是头大,比如碰上一些特效极多的偶像番的字幕
本帖最后由 马可solo 于 2023-4-19 13:25 编辑
把 otf 封进字幕文件里面
是什么意思,字幕文件我理解是纯文本文件,字体是塞进mkv容器里面,怎么把字体封进字幕里面
是說字型檔案可以直接轉換成純文字,然後直接放在 " .ssa/.ass" 檔案裡面
也就是「把字型內嵌進字幕裡」,喵萌曾經有做過這種字幕檔意思是把字体比如ttf文件子集化,再转成纯文本放入字幕文件比如ass?不是很理解
马可solo 发表于 2023-4-19 13:21
是什么意思,字幕文件我理解是纯文本文件,字体是塞进mkv容器里面,怎么把字体封进字幕里面
字体封入 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 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 没啥关系
楼主真是细心。发现这个区别。我自己封装的都是第一种类型,我差点以为要把之前封装的重新封装一次了。。
刚才去试了下兼容性,平板上用mxplayer播放可以加载字体。 然后jellyfin转码播放也可以正常加载字体。感觉这兼容性算是不错了,不捣鼓了,免得心累。。
页:
1
[2]