VLC now render subtitles in South Asian scripts!

If you were following VLC development status (hey, you should follow the awesome Jean-Baptiste Kempf’s weekly updates!), you might have noticed some recent improvements on how VLC handles subtitle text rendering. In May 2015, the freetype module was improved to use Harfbuzz for text shaping. On the week of August 4, it was mentioned that the internals of VLC subtitle handling were completely rewritten . And in last week’s (October 26) update it mentioned Salah-Eddin added support for font fallback in the freetype module; which would mean that there is no need to set a specific font to display particular script/language.

All this combined, it should mean that complex text shaping and rendering for subtitles should work fine out of the box. To test this, I built the VLC 3.0.0-git master branch by checking out the code, creating a tar ball and adapting the spec file from RPMFusion to build RPM package. NOTE: don’t remove '.git*' files while creating tar ball, otherwise building would fail. Then edited/translated one of the .srt subtitle files and used that to play a movie. The result is – Malayalam subtitles are shaped and rendered beautifully!

VLC rendering Malayalam subtitle

VLC rendering Malayalam subtitle

Jean-Baptiste Kempf tells me that this should also work fine with Android (since version 1.6.90) as well as with Windows. Totem (GNOME Vidoes) have been displaying complex texts correctly since years but VLC lacked that feature till now. This is an awesome news for people who were limited in enjoying world movies in their own language. There are collectives like MSone where volunteers translate world movies’ subtitles to Malayalam and help those to reach wider audience.

Kudos to the awesome Videolan team!

Advertisements

7 thoughts on “VLC now render subtitles in South Asian scripts!

  1. Brilliant! I presume that since VLC uses libass, other video players will benefit from it too?

    I’m an mpv user myself, mostly because I have an ancient laptop from 2004 that can only manage 10-bit HD videos (which is a dumb encoding, but that’s the anime community for ya!) with mpv.

  2. @Yannis VLC uses libass to render subs, but this doesn’t concern libass directly (it can already display basically everything), but it “[changes] the way [VLC is] passing the text information from demuxers to decoders to text renderers” as per the August 4 link, so it likely won’t affect other players (AFAIK mpv has been able to handle all kinds of scripts for a while.)

    I also use mpv, not because I have an old machine, but because it is by far the best media player around. Its OpenGL video output is absolutely fantastic, and can leverage high-end hardware a lot better than any other player.

  3. Yannis – as Randy mentioned this change is internal to how VLC handles subtitle from demuxers to decoders to text renderers. In fact, VLC has been able to properly shape and render complex script using libass for a long time. This change mostly affects the SubRip (srt) format subtitles.

  4. Hello, I have a question about this improvement: recently, I tried to play a video with a .srt subtitles file containing Thai script. Instead of displaying the subtitles, I only got squares. I could correctly see the subtitles by changing the font for subtitles in VLC’s preferences and selecting a Thai font. I use VLC 2.2.2. With this change, will I be able to play videos with South-Asian scripts such as Thai without needing to manually select a specific font?
    Anyway, good job, and thanks for this awesome program that is VLC.

  5. Matt,
    Yes, that is correct – you no longer need to set the font manually with upcoming version 3.0.0. VLC will automatically fall back to the default font for the script.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s