[GUIDE] Anime + UMS. Fixing fonts for proper playback.

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

[GUIDE] Anime + UMS. Fixing fonts for proper playback.

Post by Goldfire »

This is no longer required in the latest versions of UMS as FFMPEG can read attachment files. I'll leave this here for people forcing older versions of UMS.



If this is in the wrong spot, please move it (or remove it if it violates the rules or if it's unneeded). PS, let me know if the pictures are not displaying, I'm hotlinking them from Dropbox and their link might not be valid over time - if they decide to break, try using this link I've shared from my Dropbox https://www.dropbox.com/sh/5sqnpmxwfwsm ... Abnia?dl=0.

I thought I'd write up a quick guide for those of us that use UMS to play anime/TV shows with embedded subtitles and special attachments like fonts. I worked this out myself a few months ago and forgot to let others' here know, but I'm guessing at least other people have worked this one out - even though I'm still seeing the odd thread here and there about it. So, here's the guide at least for those that have come across this issue and want a fix.

Many new shows are using custom fonts, which when they are substituted with basic fonts, will usually break their styling and overall looks horrible, as seen below.

I've put a tl;dr at the bottom for techie people that just want a quick rundown on what to do, otherwise, read on.

Sick of your fonts looking like this?

Image

When they should look like this?

Image

Both shots above were captured on the PS3 with my capture card - the fonts and styling in the bottom screenshot is exactly how they look on a PC (MPC-HC) and are correctly displayed. The reason I've been able to gather for this issue, is because FFmpeg doesn't have the ability to read extra attachments within MKV containers - sure, MEncoder might display the correct font, but are they in the correct position? Not so much.

There's an easy fix, but it's also an annoying fix at the same time. Basically, you'll want to use MKVCleaver (http://www.videohelp.com/tools/MKVcleaver) + MKVToolnix (http://www.videohelp.com/tools/MKVtoolnix) and extract the attachments from the files, this is a bulk way of doing it, but you'll have to do it for every new file you get until FFmpeg can start reading attachments within MKV containers.

You'll obviously be doing this on the computer that is also running UMS.
Install MKVCleaver, MKVToolnix and run MKVCleaver after installation. Hit the "Locate MKVToolnix..." button in the top right, locate your installation (Usually C:\Program Files\MKVToolnix), hit OK.

1) Add your MKV files either by clicking "Open MKV files to process..." or simply drag them into the main window of MKVCleaver.
2) Tick the "Attachments" checkbox
3) Select a Output directory, somewhere easy to remember for simplicity
4) Hit Extract Tracks!

Image

Once that is done...

You might notice that it's exacted everything, but has put them into individual folders for each episode. Following the steps below will be the quickest way of getting all of the fonts out of each of those folders.

1) Navigate to your extract location (D:\ in my case)
2) Using the search box of Windows Explorer or similar, search for *.ttf (additionally, you'll need to do *.otf and *.ttc (as well as anything else I've missed) - you'll then see the results of all of the fonts you extracted. This way will be much quicker than entering each folder individually.
3) Once the search has been completed, right click-select all (or ctrl+a) => right click-cut (ctrl+x) => make a new folder for them and then => right click-paste (ctrl+v) - "Copy and replace" for all files. This will iron out any duplicate fonts you end up with - which you most certainly will because fansub groups tend to use the same fonts throughout a series, and gradually add to them as the series continues - hence the need for doing this with almost every new episode you acquire.

Image

Once that is done...
1) Make sure you're in the new folder that you just pasted all of the fonts to
2) Select all of your files and once again => cut them (ctrl+x)

Image

Last step...
1) Head over to C:\Windows\Fonts and paste the fonts in
2) Tick the checkbox to do this for all items
3) You can guess what this button does.

Image

Once that is all done, you may delete those extracted folders from earlier. Go ahead and load up UMS, make sure you have the options below selected:

1) FFmpeg first, MEncoder second, tsMuxeR third in the engines section
2) Select Fontconfig/Embedded fonts
3) Defer to MEncoder when transcoding subtitles

Image

I've found that most files will play without issue, however some are a bit of hassle to get the right fonts still. You'll need to enable the "Transcode folder" on the "Navigation/Share Settings" tab. The absolute last step in this is when browsing your files...

1) Enter the #--TRANSCODE--# folder on the PS3 (or the device you're using)
2) Select the episode you want
3) Choose [FFmpeg] {audio: Japanese} {Sub: SSA/English} - your files may show slightly different names, but it will almost always be the third option from the top
4) Enjoy

I know it seems like a very complicated process, but once you've done it a couple of times, you'll have new fonts installed and ready for UMS to use for all your newly acquired shows within 30 seconds.

tl;dr - extract attachments only using MKVCleaver => takes those extracted TTF/OTF/TTC/etc font files and place them in your Windows\Fonts folder, overwrite as necessary => restart UMS (maybe) => --TRANSCODE-- the files you want to play with FFMpeg.
Last edited by Goldfire on Thu Oct 13, 2016 4:29 pm, edited 3 times in total.
User avatar
Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: [GUIDE] Anime + UMS. Fixing fonts for proper playback.

Post by Madoka »

Currently, UMS will defer to MEncoder for files with embedded fonts so UMS plays those files ok for me, even if you don't check "Defer to MEncoder".
Goldfire
Posts: 10
Joined: Fri Dec 05, 2014 6:38 pm
Location: Sydney, Australia

Re: [GUIDE] Anime + UMS. Fixing fonts for proper playback.

Post by Goldfire »

Madoka wrote:Currently, UMS will defer to MEncoder for files with embedded fonts so UMS plays those files ok for me, even if you don't check "Defer to MEncoder".
Since the start, MEncoder has had trouble playing the attachments within MKV files as well - the fonts were always substituted. You might not be noticing a difference if you're using releases by HorribleSubs because they just use basic fonts anyway and can be substituted with ease.

The steps above are only valid for fansub groups that use unique fonts that aren't readily available within your system. Most notably things like SAO and similar. Even if you don't follow the steps above, your subtitles will display fine, but the styling will most likely be broken and not lined up correctly on screen - you can see this with the two screenshots I posted.

EDIT: Here's a screenshot to better illustrate what I'm trying to say, this was transcoded using the MEncoder engine. Correct fonts, wrong placements = broken styling - you can imagine what this does when signage translations are involved:

Image
Post Reply