Export to GitHub

libass - issue #38

mplayer with libass 0.9.12 and later doesn't respect font settings for srt files embedded in mkv container


Posted on Aug 10, 2011 by Helpful Giraffe

I'm not really sure if it's a libass, mplayer or smplayer issue, but what the heck, here we go.

I'm using libass with mplayer and smplayer front-end. Since 0.9.12 libass is ignoring subtitle font settings for embedded subtitles (but is respecting them for external subtittle files). Here's the mplayer command line issued by smplayer:


/usr/bin/mplayer2 -noquiet -nofs -nomouseinput -lavdopts threads=2 -sub-fuzziness 1 -identify -slave -vo xv -ao alsa -nokeepaspect -framedrop -nodr -double -input nodefault-bindings:conf=/dev/null -stop-xscreensaver -wid 73401064 -monitorpixelaspect 1 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles /home/piotrek/.config/smplayer/styles.ass -fontconfig -font Serif -subfont-autoscale 0 -subfont-osd-scale 18 -subfont-text-scale 18 -subcp enca:pl:UTF-8 -vid 0 -aid 0 -subpos 100 -volume 100 -cache 50000 -osdlevel 0 -idx -vf-add ass -vf-add screenshot -slices -channels 2 -af scaletempo -softvol -softvol-max 100

Here's the contents of /home/piotrek/.config/smplayer/styles.ass:


[Script Info] ScriptType: v4.00+ Collisions: Normal

[V4+ Styles] Format: Name, Fontname, Fontsize, PrimaryColour, BackColour, OutlineColour, Bold, Italic, Alignment, BorderStyle, Outline, Shadow, MarginL, MarginR, MarginV

Style: Default,Serif,18,&H00ffffff,&H00000000,&H00000000,0,0,2,1,1,0,20,20,8

I'm attaching two files: ass1.png is how the subtitles look with newer versions and ass2.png is how it is correctly rendered with libass 0.9.11.

Here's the mplayer log with libass 0.9.13 grepped for ass:

[ass] File size: 300 [ass] ENCA supported languages [ass] lang be [ass] lang bg [ass] lang cs [ass] lang et [ass] lang hr [ass] lang hu [ass] lang lt [ass] lang lv [ass] lang pl [ass] lang ru [ass] lang sk [ass] lang sl [ass] lang uk [ass] lang zh [ass] lang __ [ass] ENCA detected charset: ASCII [ass] Opened iconv descriptor [ass] Closed iconv descriptor [ass] [0x25072c0] Style: Default,Serif,18,&H00ffffff,&H00000000,&H00000000,0,0,2,1,1,0,20,20,8 Opening video filter: [ass] [ass] FreeType library version: 2.4.6 [ass] FreeType headers version: 2.4.6 [ass] Init [ass] FreeType library version: 2.4.6 [ass] FreeType headers version: 2.4.6 [ass] Init [ass] Updating font cache [ass] Updating font cache Trying filter chain: ass screenshot vo * [ass] Exporting mp_image_t, 1680x944x12bpp YUV planar, 2378880 bytes [ass] PlayResX undefined, setting to 384 [ass] Font info: family 'Arial', style 'Negreta', fullname 'Arial Negreta', slant 0, weight 200

[ass] fontconfig_select: (Arial, 200, 0) -> /usr/share/fonts/corefonts/arialbd.ttf, 0

What steps will reproduce the problem? 1.Get an mkv video with an embedded srt subtitle track 2.Notice how your font settings are being ignored

What version of the product are you using? On what operating system? MPlayer SVN-r33094-4.5.2 and MPlayer2 2.0-303-ga5c6428 (same result) with libass 0.9.13 on 64 bit Gentoo Linux

Attachments

Comment #1

Posted on Aug 15, 2011 by Helpful Bird

This probably happens because MPlayer doesn't correctly edit the ASS styles of the track it creates for the converted SRT subtitles. There's a fix for it in MPlayer2: http://git.mplayer2.org/mplayer2/commit/?id=378ada847c8eb3a641392691b1a2317f8fc214e0

Comment #2

Posted on Aug 15, 2011 by Helpful Bird

This isn't really related to libass though, so I'd say it's invalid.

Comment #3

Posted on Aug 15, 2011 by Helpful Giraffe

As I said, the same thing happens with mplayer2 (snapshot from august), so it's not it.

Comment #4

Posted on Aug 18, 2011 by Helpful Bird

OK, I'll check it out, give me a few days.

Comment #5

Posted on Sep 11, 2011 by Happy Bear

Hi! I've pushed libass-0.9.13 stabilization as 0.9.11 has known and fixed crash with stable freetype-2.4.6 [1] but I'll feel myself much better if this bug will be squashed somehow too. So is there any progress here?

[1] thank you btw for fixing crash!

Comment #6

Posted on Jan 13, 2012 by Happy Elephant

Any updates to this issue?

Comment #7

Posted on Jan 14, 2012 by Helpful Giraffe

It got fixed somewhere along the way, but only in mplayer2. mplayer1 is still showing this issue.

Comment #8

Posted on Jan 14, 2012 by Happy Elephant

Is it possible to fix it in mplayer, too?

Comment #9

Posted on Jan 14, 2012 by Helpful Giraffe

I don't know. Probably. Ask the mplayer devs.

Comment #10

Posted on Jan 14, 2012 by Happy Elephant

Comment deleted

Comment #11

Posted on Oct 2, 2012 by Helpful Bird

This should be fixed in both players now.

Comment #12

Posted on Oct 2, 2012 by Helpful Giraffe

I no longer have this problem with neither mplayer nor mplayer2.

Status: Fixed

Labels:
Type-Defect Priority-Medium