[FFmpeg-trac] #9419(undetermined:new): support current standard font mimeypes in matroska metadata

FFmpeg trac at avcodec.org
Sun Sep 12 17:16:45 EEST 2021


#9419: support current standard font mimeypes in matroska metadata
-------------------------------------+-------------------------------------
             Reporter:  bfhpx4hjah   |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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:
 https://www.iana.org/assignments/media-types/media-types.xhtml#font
 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
     Metadata:
       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
     Metadata:
       filename        : NotoSans-Regular.ttf
       mimetype        : application/x-truetype-font
 ...
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9419>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list