After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603938 - assrender cannot load font attachments in Matroska container
assrender cannot load font attachments in Matroska container
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 575879 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-12-07 00:07 UTC by Eric Appleman
Modified: 2009-12-07 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MKV with embedded fonts (334.28 KB, image/png)
2009-12-07 07:51 UTC, Eric Appleman
Details
MKV with embedded fonts - required fonts manually extracted and placed in directory (323.35 KB, image/png)
2009-12-07 07:52 UTC, Eric Appleman
Details

Description Eric Appleman 2009-12-07 00:07:53 UTC
Currently, assrender requires fonts to be installed on a system or in the same directory as the video in order for styled subtitles to render properly.

Many anime-related videos that make use of the Matroska container have fonts muxed in as attachments. assrender should be able to load these fonts.
Comment 1 Sebastian Dröge (slomo) 2009-12-07 04:54:40 UTC
Could you attach a small sample with embedded fonts?
Comment 2 Eric Appleman 2009-12-07 07:51:26 UTC
Created attachment 149231 [details]
MKV with embedded fonts
Comment 3 Eric Appleman 2009-12-07 07:52:15 UTC
Created attachment 149232 [details]
MKV with embedded fonts - required fonts manually extracted and placed in directory
Comment 4 Sebastian Dröge (slomo) 2009-12-07 08:01:25 UTC
Well, without having a sample file with embedded fonts I can't work on this :) I have no idea how the embedded fonts are represented in Matroska.

But one idea to support this automatically would be by adding the fonts to the codec data as additional buffers after the first.
Comment 5 Sebastian Dröge (slomo) 2009-12-07 08:20:00 UTC
Actually this is already done in a similar way... should be easy to find the reason why it doesn't work here with the help of the sample ;)
Comment 6 Tim-Philipp Müller 2009-12-07 09:20:34 UTC
*** Bug 575879 has been marked as a duplicate of this bug. ***
Comment 7 Sebastian Dröge (slomo) 2009-12-07 12:42:12 UTC
Maybe this fixed it already:

commit ebc1f45f38a9d461464dbce1d5314f9ca710457d
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Dec 7 13:40:56 2009 +0100

    assrender: Extract embedded fonts from the subtitle streams if requested


If not it might help also if you could give me the font attachment filename and mimetype.
Comment 8 Eric Appleman 2009-12-07 15:26:40 UTC
The commit didn't seem to fix the issue.

Font mimetype is application/x-truetype-font

Common filetypes are probably case sensitive and include TTF, ttf, otf
Comment 9 Sebastian Dröge (slomo) 2009-12-07 16:21:55 UTC
(In reply to comment #8)
> The commit didn't seem to fix the issue.
> 
> Font mimetype is application/x-truetype-font
> 
> Common filetypes are probably case sensitive and include TTF, ttf, otf

Ok, the mimetype is fine then. For this file, do the embedded fonts have a filename?
Comment 10 Eric Appleman 2009-12-07 17:02:33 UTC
Yes. The files each have an alphanumeric filename (underscores too).

Also, here's the sample file.

It is 90 seconds long and calls about 20 different embedded fonts.

http://rapidshare.com/files/317610440/zan-sayonara-zetsubou-sensei-opening-all-fonts.mkv.html
Comment 11 Eric Appleman 2009-12-07 17:03:41 UTC
Alternate link: http://www.megaupload.com/?d=TVFH66Q3
Comment 12 Sebastian Dröge (slomo) 2009-12-07 17:32:43 UTC
commit d06e9c40e648a627b5b7c5b86c171bf84340530b
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Dec 7 18:30:05 2009 +0100

    assrender: Improve embedded font usage
    
    For this add some new mimetypes and also check the filename extension.
    
    Fixes bug #603938.