Page 1 of 1

.ass subtitles don't display the right way

Posted: 05 Jul 2012 13:04
by spiderben25
Hi,
I registered to this forum to ask for some help regarding .ass subtitles. I'm using VLC 2.0.2 on OS X 10.8 DP4, however, the problem showed up too when I was using VLC 1.x.x on Mac OS X 10.7.x.
This problem affects ONLY .ass subtitles. .srt subtitles are displayed just fine, without changing any settings !

So, here's a picture to show you what's happening :
Image

And here's a picture of the same video, same subtitle file, played by the latest version of MPlayerX, on the same computer :
Image

You can download the subtitle file here : http://www.datafilehost.com/download-511aae37.html

I also noticed that, on some others .ass files, instead of the weird boxes, when the subtitle line contains characters like é, ù or à, the font isn't the same compared to the subtitles lines who don't contain those characters. It's like an italic font, and there are blanks instead of the é,è,à.

Please, what can I do to play these files the right way ? I don't want to use .srt files because the position tags don't work, and I don't want to use MPlayerX because of your awesome subtitle scaling to the resolution of the screen and not the resolution of the video file.

Re: .ass subtitles don't display the right way

Posted: 06 Jul 2012 06:04
by nkoriyama
VLC uses freetype renderer module when playing SubRip(srt), and uses libass module when playing SSA/ASS.
Both module use fontconfig library. To be exact, from 2.0.2, freetype renderer module doesn't use fontconfig.

This issue happens because fontconfig library installaiton on VLC for Mac.
fontconfig library is used for choosing font from system, and by default on Mac, it searches from only /System/Library/Fonts.
I fixed this behavior (add font search path /Library/Fonts and ~/Library/Fonts) only for freetype but not for libass.

At the moment, you can do:
- Use the fonts in the /System/Library/Fonts.
- Copy the fonts to /System/Library/Fonts.
- Wait for fixing this issue:-)

Re: .ass subtitles don't display the right way

Posted: 06 Jul 2012 09:24
by spiderben25
I opened my .ass file to know which font is used (it was Arial), so I made a copy of my Arial font (which was in my Library folder) to /System/Library/Fonts, like you said, and activated it using the fontbook.
And it works ! Thanks, you're a genius :-)

Re: .ass subtitles don't display the right way

Posted: 17 Jul 2012 19:18
by Jean-Baptiste Kempf
He is :)

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 04:13
by sikachu
I'm trying to fix this issue (not sure if you guys already have a ticket in trac or not) and seems like I found the fix for freetype here: http://git.videolan.org/?p=vlc.git;a=co ... h=b8fd5718

Now, I think I'm hitting a huge wall here because looking at `contrib/src/ass/rules.mak` and `contrib/src/fontconfig/rules.mak` and I'm not sure where I should fix it. If you can give me some guidance that'd be great.

Thank you.

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 04:25
by sikachu
Never mind, that was the wrong commit. I found the right changes in http://git.videolan.org/?p=vlc.git;a=co ... h=b698c1c3 and I think I'll need to fix `modules/codec/libass.c`. Doing it now ...

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 05:40
by sikachu
I can't get it to work after patching & recompile VLC. I think I'll give up for now. Can you tell me if I'm doing it right?

https://gist.github.com/3148494

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 11:39
by fkuehne
Hello thanks for your interest. Regrettably, this is approach is wrong. You're not supposed to use fontconfig anymore. Please have a look at my recent changes to the freetype module. It includes an automatic font look up mechanism which doesn't rely on libfontconfig. This is a cleaner approach since a cache is no longer needed.

Please tell me if you're interested in implementing this feature. If not it's no problem and I will see what I can do.

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 14:13
by sikachu
Please tell me if you're interested in implementing this feature. If not it's no problem and I will see what I can do.
Sure thing. Let me get a crack at it and see if I can port your changes from freetype somehow. >_>

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 17:53
by nkoriyama
If we don't use fontconfig, we have to modify libass itself.

Re: .ass subtitles don't display the right way

Posted: 20 Jul 2012 18:13
by sikachu
Yeah, I just realized that the hard way with @feepk on the IRC. We will try to figure out the best way to tackle this, as it's not as straightforward as I'd expect.

Re: .ass subtitles don't display the right way

Posted: 13 Sep 2017 18:50
by AlexSurin
At the moment, you can do:
- Use the fonts in the /System/Library/Fonts.
- Copy the fonts to /System/Library/Fonts.
- Wait for fixing this issue:-)
Hello! It's not easy anymore to put anything into /System/Library/Fonts as of 10.11 El Capitan (unless you turn off "System Intregrity Protection"). Looks like it's time to fix this thing. Or is there another way to use custom fonts with .ass subtitles?