FAQ  •  Register  •  Login

Mediabrowser burned in subtitle font/size doesn't change

<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Fri Dec 11, 2020 1:10 pm

Mediabrowser burned in subtitle font/size doesn't change

The move fury is what I'm testing with. I have a forced .srt file that is embedded into the MP4. When I play it on any media player like VLC or MPC-HC and enable the subtitles.....they render and look great.

When I view the same file on Mediabrowser, the text does show up, but is very small and can't seem to be adjusted in size.

Using version 2.0 on my synology NAS.

I have transcoding enabled
Enable subtitles
Enable extraction of text-based
Try to automatically
UTF-8
Enable burned in

All checked active and saved.

I have the font written as Arial, size of 24, color white.

No change in font size...which is what I'm after.

I tried to switch white to red...font remains white.

I've restarted the package on the NAS, still remains white even though red is in the console.

So since I can't seem to get 2.1 because it's still not ready for the synology, how to do I patch this via SSH?

I can recode the jar if needed to make the fix, just need to know how and where to fix.

Anyone know how to resolve this or tell me what step I'm missing to make the font/color change work?

Thanks,
Chris
<<

bolzass

Serviio lover

Posts: 67

Joined: Thu Jan 02, 2014 6:32 pm

Post Sat Dec 12, 2020 9:11 am

Re: Mediabrowser burned in subtitle font/size doesn't change

Hi, Chris. Just an approach, try to change Arial to Tahoma (that worked on my Ubuntu) or even to nothing (no idea what ffmpeg does with its defaults).
It seems that is related to ffmpeg more than serviio itself (ffmpeg's fontconfig) .

Hope that could points you to the right direction, cheers.

[edit] : for synology NAS I found:
If you need subtitle support for glyphs not present in the default DejaVu fonts, add additional fonts to the following folder inside your NAS’s public shared folder (usually /volume1/public/serviio/fonts/).
at https://pcloadletter.co.uk/2012/01/25/serviio-syno-package/
You could take a look what fonts do you have in /volume1/public/serviio/fonts/ or put the Arial one there.

Anyway, This is my config on Ubuntu
  Code:
ffmpeg compiled with '--enable-fontconfig' (check with ffmpeg -version| grep font)
Package fontconfig-config (package fontconfig and any fonts-xxx could be desirable)
EnvVars:
export FONTCONFIG_PATH=${FONTCONFIG_PATH:-"/etc/fonts"}
export FONTCONFIG_FILE=${FONTCONFIG_FILE:-"$FONTCONFIG_PATH/fonts.conf"}
./serviio.sh&
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Sat Dec 12, 2020 1:11 pm

Re: Mediabrowser burned in subtitle font/size doesn't change

Hi!

Thanks for the detailed response. I clearly missed that passage on the page......and I'll admit, didn't read it all. I did now after you pointed it out.

So to be clear, I "understand" linux from a windows point of view. I can and have access to the NAS via SSH and have full access to that path.

I found the font file from here:

https://www.freedesktop.org/software/fo ... /webfonts/

I extracted the Arial.ttf and uploaded it to /volume1/Public/serviio/fonts/ > and have the dejavu-fonts and now Arial.ttf there.

Went into the console and have the word Arial, 24, and I changed color to aqua to ensure a change is seen. I also restarted the package to ensure it reloads all the config data.

Mediabrowser > No change

I also added it here: /volume1/@appstore/Serviio/config/fonts

just to see if it would have any effect.....same result....no change.

Now in terms of your last entry with compiling, that is where my linux stops, was I supposed to just drop the arial.ttf file in either of those locations after I extracted it, or was I supposed to do something with it.

If so, I'd need some help to fill in the gap for the compiling step and how to do that.

Thanks again for your help, much appreciated.

Chris
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Sat Dec 12, 2020 6:21 pm

Re: Mediabrowser burned in subtitle font/size doesn't change

I found this:

flowplayer .fp-captions{bottom:1.2em;display:none;text-align:center;color:#fff}.

hard coded in mediabrowser.css in mediabrowser.jar.

So that is what I am seeing, not sure how the console overrides this??

Zip any ideas?
<<

bolzass

Serviio lover

Posts: 67

Joined: Thu Jan 02, 2014 6:32 pm

Post Sat Dec 12, 2020 6:52 pm

Re: Mediabrowser burned in subtitle font/size doesn't change

Hi Chris!
First of all, I apologize as you were always talking about MediaBrowser and I didn't realise it was different as for DLNA.
What I suggested you was for the burning subtitles, and MB doesn't burn them as I have noticed in my tests.

Please, let me put in order:
- About Ubuntu/ffmpeg compilation and environment (my last entry):
    I showed you my Ubuntu linux scenario (I do not have a synology to look into) just to help you understand where to point to (assumed linux knowledge, apologies), but I gave you bad advice (my explanations confused you, I'm sure). I'm sorry :oops: .
    So, Nothing to do with your ffmpeg here. [Taking into account the comment from the serviio package for synology I showed you, it suggests that the author bore all this (fontconfig and so) in mind when wrote it. So, forget that.]
- About MediaBrowser, I tested mine (v2.1) as if it were yours:
    Font and size does not change as it is fixed for Mediabrowser (I checked processes and so) even when checking the burning subtitles.
    It seems that the burning subtitles and font configuration only work for DLNA profiles but mediabrowser (it is managed by flowplayer and not ffmpeg :?).
    Conclusion, cannot be changed without hacking the MediaBrowser's JS (@zip should do it).
- About the glyphs on your synology (fonts):
    You can undo the Arial addition (if you want) you did as it will only work for ffmpeg transcoding when burning.
    To check your changes (font, size and colour) are working, test on your TV (or any other DLNA client) to be sure.
    As you confirmed you already have DejaVu fonts installed by default, test it with FontName "DejaVu Serif" as it should work.

I'm sorry by misunderstanding you but it will not work for Mediabrowser, you should ask it directly to @zip (the owner) for changing that.
Cheers!
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Sat Dec 12, 2020 10:20 pm

Re: Mediabrowser burned in subtitle font/size doesn't change

I can easily change the Jar file, just need to know what makes sense there and what is supported.

I'd like to see it as white with black border outline as you see in most subtitles.

I'm sure it is a simple HTML hack to the .css file for mediabrowser, so hopefully he will respond soon.

I sent him a private message to review this thread, hopefully he has some insight.

Thanks for you followup, all good.

Greetz,
Chris
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Thu Dec 17, 2020 12:37 am

Re: Mediabrowser burned in subtitle font/size doesn't change

I went ahead and sorted this out myself. I think there should be a modification that applies the console settings also to the mediabrowser.

The file inside the serviio-mediabrowser-web.jar called MediaBrowser-2.0-13.css (this may vary with version....I'm using 2.0 on a Synology NAS, but applies to all platforms) is what needs to be modified.

I did it like this:

Before:

  Code:
.flowplayer .fp-captions {
    bottom: 1.2em;
    display: none;
    text-align: center;
    color: #fff
}


After:

  Code:
.flowplayer .fp-captions {
    bottom: 1.2em;
    display: none;
    text-align: center;
    color: #fff;
    font-size:28px;
    font-family: Verdana;
    font-weight: bold   
}


Which yielded the following results:

Before:

http://www.kittmaster.com/imagedump/serviio/Original.png

Image

After:

http://www.kittmaster.com/imagedump/serviio/Fixed.png

Image

Hopefully this helps someone in the future.

Greetz

EDITED 12/17/2020: Original adjusted value was 38px, adjusted it to 28px for better TV compatibility with smaller resolutions.....seems like a good balance.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 105 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.