Opened 2 years ago

Closed 2 years ago

#9419 closed enhancement (fixed)

support current standard font mimetypes in matroska metadata

Reported by: bfhpx4hjah Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

Only legacy font mimetypes are recognized in matroska mimetype metadata tags. E.g. a truetype font is only recognized if the mimetype metadata tag is "application/x-truetype-font", the current standard "font/ttf" isn't recognized.
One problem resulting from this is that when using the subtitles filter, fonts tagged with current standard mimetypes won't be used and subtitles thus might be rendered incorrectly.
The current standard mimetypes for fonts can be found here:
Mkvtoolnix-gui uses these mimetypes for fonts by default, any matroska file created by it containing attached fonts will exhibit this issue (unless the option to use legacy mimetypes for fonts is enabled or an old version of mkvtoolnix-gui is used).

How to reproduce:

Create a matroska file with an attached font using a recent version (58.0.0 or later, based on my testing) of mkvtoolnix-gui and try to open the file with ffmpeg:

% ffmpeg -i mime_current.mkv
ffmpeg version N-103603-gc4973e2148
built on arch linux
[matroska,webm @ 0x562ab0532b40] Could not find codec parameters for stream 1 (Attachment: none): unknown codec
  Stream #0:1, 0, 1/90000: Attachment: none
      filename        : NotoSans-Regular.ttf
      mimetype        : font/ttf

Simply changing the mimetype metadata tag to the legacy value (e.g. using mkvpropedit or the edit headers tool in mkvtoolnix-gui) will solve the issue:

% ffmpeg -i mime_legacy.mkv
ffmpeg version N-103603-gc4973e2148
built on arch linux
[matroska,webm @ 0x55649aa2eb40] All info found
  Stream #0:1, 0, 1/90000: Attachment: ttf
      filename        : NotoSans-Regular.ttf
      mimetype        : application/x-truetype-font

Change History (5)

comment:1 by bfhpx4hjah, 2 years ago

Summary: support current standard font mimeypes in matroska metadatasupport current standard font mimetypes in matroska metadata

comment:3 by mkver, 2 years ago

Status: newopen

I actually wanted to do this as soon as there is official agreement about this here. But it seems that the "soon(ish)" there can be pretty long, so I will just add all the mime types even without an official list.

comment:5 by Elon Musk, 2 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.