Jump to content

Status on official LG app


jhs

Recommended Posts

 

Also just read your point about the sub colour - and whilst I can't confirm that colour used to work on the old version (as I never used it) - it does not work on my TV either - but italics and underline do ..

 

1
00:03:25,247 --> 00:03:27,124
normal:Look who we have here. Works fine
 
2
00:03:32,296 --> 00:03:33,923
bold:You have our money?      May work, but as it's so bright anyway (HDR) I'm not sure it's any more bold than a normal sub  ..  ;)
 
3
00:03:38,469 --> 00:03:39,470
italic:Search him.   Works fine
 
4
00:03:41,060 --> 00:03:43,395
underline:Not if I shoot you. Works fine
 
5
00:03:45,998 --> 00:03:50,458
colour:Coaxium is precious. Doesn't work - just retina burning white ...  :o
 
Lets hope this can be restored - as I agree with you subs are FAR too bright - I've never tested as I've never had any HDR movies using SRT subtitles .. 

 

 

I did actually just answer this yesterday but i can't find the topic, it must not have been in the LG section. But previously we were rendering the subtitles with our own code and that's why it worked, but that's also the reason why there were other subtitle problems such as alignment and things of that nature. 

 

For WebOS 3+ we have switched to just having the LG player render the subtitles as we've discovered that our workaround is only needed for WebOS 1&2. So if you're not seeing the font style then it means LG does not support it.

Link to comment
Share on other sites

FWIW, the XPlay app for LG (using Plex) has different color options.  At one point, the creator of the app added a "Silver" color subtitle option to resolve this exact HDR issue.  With XPlay, the subs are also being rendered by LG, so this should be possible as a feature add in Emby.

 

Is there a formal "feature request" process?

 

There is an open feature request already related to subtitle color. I would lend your support into that topic. Thanks.

Link to comment
Share on other sites

rbjtech

 

For WebOS 3+ we have switched to just having the LG player render the subtitles as we've discovered that our workaround is only needed for WebOS 1&2. So if you're not seeing the font style then it means LG does not support it.

 

Playing the same video file on the internal LG player with external .SRT ignores the italic and underline while Emby plays them  .. so it's not consistent.  Anyway - I'll add my support for the colour options, as that is a real issue for HDR movies.  Thanks Luke. 

 

For those wanting to add support - the subtitle colour feature request thread is here :-

 

https://emby.media/community/index.php?/topic/45892-subtitle-size-and-color/page-2?hl=subtitle

Edited by rbjtech
Link to comment
Share on other sites

rbjtech

What do you mean internal LG player? How did you do that?

 

Same file as Emby would have played but copied to a USB stick and played directly in the file list browser when you navigate the USB files.

Link to comment
Share on other sites

pastorn

Hey guys,

 

Has anyone tried subtitles in SMI format? That is some kind of HTML derivative, correct (?). It's first in the list of LG:s supported formats so perhaps that is most widely supported? If I remember correctly the color is specified in clear text, like "white", "red", "blue" etc. I don't have the time on my hands to make trial/error experiments this weekend but I'd be happy to verify if someone finds a solution? Maybe this is how XPlay does it (?). Perhaps try "grey", "silver" or similar in the color spec and see what happens?

 

/Martin

  • Like 1
Link to comment
Share on other sites

rbjtech

We have a winner !  :)

 

External .ASS and .SSA appear to be fully compatible with the LG Player and thus work with font, colour and location !

 

You can have them all (for full compatibility with other players) and just pick the one you want.

 

The Matrix (1999) - UHD 2160p.HDR.ass

The Matrix (1999) - UHD 2160p.English.srt

 

By using the .forced. then the HDR one is automatically picked which I guess is what you want if playing on your main TV  but that obviously then applies to all the clients so may not be what you want.

 

Converting .SRT is a simple ffmpeg command line -

 

ffmpeg -i "<filename>.srt" "<filename>.ass"

 

5c9f6bb9b0b02_ass.png

 

I'm going to write a script to identify the HDR films, and then add the .ASS subtitle as well - I'll post that soon but just glad it works - no more high intensity white subtitles.

 

 

Output from conversion (ps - these are fake subs from the film Solo - just used for testing )  :-

 

[script Info]
; Script generated by FFmpeg/Lavc57.66.101
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288
 
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
 
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:03:25.25,0:03:27.13,Default,,0,0,0,,normal:Look who we have here.
Dialogue: 0,0:03:32.30,0:03:33.93,Default,,0,0,0,,{\b1}bold:You have our money?{\b0}
Dialogue: 0,0:03:38.47,0:03:39.47,Default,,0,0,0,,{\i1}italic:Search him.{\i0}
Dialogue: 0,0:03:41.06,0:03:43.40,Default,,0,0,0,,{\u1}underline:Not if I shoot you.{\u0}
Dialogue: 0,0:03:46.00,0:03:50.46,Default,,0,0,0,,{\c&H808080&}colour:Coaxium is precious.{\c}
Dialogue: 0,0:03:55.25,0:03:57.13,Default,,0,0,0,,normal:again

 

These ALL work fine - happy days  :)

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

pastorn

Good news indeed! :-D Nice work, my man! Will hopefully be able to verify the compatibility on my 2016 model tonight, I think that’s WebOS 3.0 (?). Keeping my fingers crossed. :-)

 

Best regards

/Martin

Link to comment
Share on other sites

pastorn

Tested and works! :-D Wohooo!!

 

Couldn’t tell if bold style made a difference but I believe that to be the least important of styles. I also believe LG is only partially supporting SSA, because when I converted an SRT file in Subtitle Editor I just got ”no compatible streams available”. But your code is a good working example!

 

Let me know about your scripting progress, I’m wondering if I can get some free advice there? :-)

Link to comment
Share on other sites

pastorn

The smoothest would be if one could have a script that converted all SRT files in a specific folder and specified subtitle colors, font, size and position according to user preferences (specified in the script). All styles in the SRT file should be removed automatically. Then the daily process would only be:

1) Download suitable SRT file

2) Put in script folder

3) Run script

4) Rename SSA file to movie file name

 

/Martin

Link to comment
Share on other sites

pastorn

Have tried some options now. The following looks great on my screen! See below :D   A nice font, reduced brightness, high resolution, a thin outline and a subtle shadow. Plus it's in the black bars of the movie as long as the format is cinema. With the outline and the shadow it works fine also when it's 16:9. Problem solved as far as I'm concerned! Subtitle options in the app is no longer as important since this gives more customization possibilities than will ever be available in the app. A script to perform this conversion would help in the daily routine, though... B)

 

[script Info]
; Script generated by FFmpeg/Lavc57.66.101
ScriptType: v4.00+
PlayResX: 1920
PlayResY: 1080
 
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Univers 45,50,&H808080,&Hffffff,&H000000,&H181818,0,0,0,0,100,100,0,0,1,1,2,2,10,10,20,0

[Events]
Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:53.07,0:00:56.34,Default,,0000,0000,0000,,Text...

  • Like 1
Link to comment
Share on other sites

rbjtech

Great news - so for WebOS 3 and 4 - as you say, no need for any immediate fix as we can just add the .ass file as a direct conversion from the .srt via ffmpeg.

 

Started looking at the script yesterday - I got a bit hung up on identifying 'HDR' - as I only wanted .ass files for 4K HDR movies.  MediaInfoCLI and ffprobe can pick out colour primaries ok (BT.2020) but this isn't necessarily HDR (but should be).  Anyway, to cut a long story short, ran out of time yesterday, but will try and continue this week.  

 

I'll probably start a new thread in the 'Utilities' forum to avoid clogging this thread up ..  ;)

Link to comment
Share on other sites

pastorn

That sounds like a good idea! I actually tried a subtitle according to the above for a SDR 1080p movie and the result was very similiar - which was surprising. I had thought the result would be a very dark subtitle but for some reason it looked the same. So maybe all your subtitles could be converted the same way (?). In any case the position of the screen and the outlines are good under all circumstances. I would do the same for all and maybe not even change the brightness (which I had originally anticipated).

 

/Martin

Link to comment
Share on other sites

dnanielsen

I'm also interested in a script that can convert all .srt files to .ass with custom styles. I tried it out in the LG app now with an subtitle file converted to .ass in subtitle edit, and it works great. But, it is transcoding and says subtitle format not supported, are you guys able to direct play with .ass? 

Link to comment
Share on other sites

pastorn

Yes, direct play is the only mode working for me att all at the moment; transcoding breaks 4K video at my place so can't use it. You can try and copy the header from my previous post and manually edit your SSA file? I had the same experience when converting a SRT file with an editor, so probably LG doesn't support ALL aspects of SSA, only the most basic. But that's enough for a good viewing experience. :-)

 

It is interesting, however, if FFMpeg was able to transcode the incompatible SSA into a compatible one. Did you check "Stats for nerds" for what format the client experienced?

 

/Martin

Edited by pastorn
Link to comment
Share on other sites

rbjtech

I'm also interested in a script that can convert all .srt files to .ass with custom styles. I tried it out in the LG app now with an subtitle file converted to .ass in subtitle edit, and it works great. But, it is transcoding and says subtitle format not supported, are you guys able to direct play with .ass? 

 

What WebOS version is your TV ?

 

Using .ass subs has been proven on WebOS 3 and 4 at this point, and according to Luke, WebOS 1 & 2 are not compatible with this new 'LG direct' play method.  Using WebOS 3 or 4, Emby is just passing the raw data to the LG Player to interpret and deal with, hence our success in modifying the font, colour etc without needing any settings within Emby itself.

Link to comment
Share on other sites

dnanielsen

@@pastorn

Cool, I can confirm changing to the header from your previous post worked and it is now direct playing. 

This is what I had from using the Subtitle Edit software, do you understand what part of that triggers the sub to transcode? 

[Script Info]
; This is an Advanced Sub Station Alpha v4+ script.
Title: 
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,24,&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,1,1.5,1.0,2,10,10,10,1

I've attached a screenshot where I used this code and you can see in the stats for nerds. 

 

post-246418-0-47035400-1554101351_thumb.jpg

 

@@rbjtech

It's WebOS 3.5

Link to comment
Share on other sites

pastorn

Good news about direct play working for all modern versions of WebOS (3.0, 3.5 & 4.0)! I thought ”Stats for nerds” contained info about sub format but apperantly not. And it seems the entire video is being transcoded, not just the subs. Perhaps your FFMpeg logs contain clues? I’m no expert, unfortunately. Would also like to know what part of SSA that’s supported and not. :-)

 

/Martin

Link to comment
Share on other sites

rbjtech

Have a look at section 4 or 5 in this doc, it lists all the details on the .ssa/ass specification - this may give you some clues what the LG player does not like vs a simple ffmpeg .srt conversion.

 

http://www.rbjtech.net/media/ass-specs.doc

 

The only immediate differences I see in your file vs my original one, is in 'Script Info' you have 'Collisions: Normal' and 'PlayDepth: 0' but there are also a lot of parameters under 'Style:' - those are detailed in the above doc.

 

It may be easier to create your sub in a .SRT - and then just use ffmpeg to convert it ?

Edited by rbjtech
Link to comment
Share on other sites

dnanielsen

It may be easier to create your sub in a .SRT - and then just use ffmpeg to convert it ?

I started out with a .srt and opened that in an software called Subtitle Edit, changed format to .ass and changed font size and text border outline. The main reason I want this is that when playing movies (because of aspect ratio) with .srt in the LG app it is placing one line in the picture and the second line outside the picture (black bar beneath), but when I tried out .ass it's perfect with two lines of text in the picture. 

 

Can I do the same with the ffmpeg convert script, and how do I run that? 

Edited by dnanielsen
Link to comment
Share on other sites

dnanielsen

I figured out how to convert from .srt to .ass with ffmpeg, but it's missing out on a lot of lines. 

Invalid UTF-8 in decoded subtitles text; maybe missing -sub_charenc option
Error while decoding stream #0:0: Invalid data found when processing input

Also, how can I edit to custom style (fontsize etc.) when ffmpeg is converting to .ass? How you guys found a way to include all .srt in different subcategories and batch convert to .ass? 

Link to comment
Share on other sites

rbjtech

Can you give an example ? (your source .srt file or an extract of it)

 

I've only converted 'basic' subtitles with just the standard font and italics, bold and underline - I have not used any of the advanced .ass/ssa formatting and being honest, that is highly unlikely to be supported by the LG Player.

Link to comment
Share on other sites

dnanielsen

Can you give an example ? (your source .srt file or an extract of it)

 

I've only converted 'basic' subtitles with just the standard font and italics, bold and underline - I have not used any of the advanced .ass/ssa formatting and being honest, that is highly unlikely to be supported by the LG Player.

 

I tried to convert .srt to .ass with a English .srt now, and that worked with 100% of the lines. The .srt that wasn't working was in Norwegian, seems to be because of encoding. 

 

The solution I'm using now, is converting .srt to .ass in the Subtitle Edit software, and then replacing the [script info] that is output by that software with only PlayResX and PlayResY, then I'm able to direct play, with the LG Player supporting Outline, MarginV plus the basic Font changes. It's a bit more than running a command with ffmpeg but it does the trick.

Edit: Oh, actually I just figured out that the Subtitle Edit software has batch convert tool that also let's me edit the [script info] header automatically, so that is perfect. 

[Script Info]
; This is an Advanced Sub Station Alpha v4+ script.
Title: 
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0

[Script Info]
ScriptType: v4.00+
PlayResX: 600
PlayResY: 450
Edited by dnanielsen
Link to comment
Share on other sites

macnb

We have a winner !  :)

 

External .ASS and .SSA appear to be fully compatible with the LG Player and thus work with font, colour and location !

 

You can have them all (for full compatibility with other players) and just pick the one you want.

 

The Matrix (1999) - UHD 2160p.HDR.ass

The Matrix (1999) - UHD 2160p.English.srt

 

By using the .forced. then the HDR one is automatically picked which I guess is what you want if playing on your main TV  but that obviously then applies to all the clients so may not be what you want.

 

Converting .SRT is a simple ffmpeg command line -

 

ffmpeg -i "<filename>.srt" "<filename>.ass"

 

5c9f6bb9b0b02_ass.png

 

I'm going to write a script to identify the HDR films, and then add the .ASS subtitle as well - I'll post that soon but just glad it works - no more high intensity white subtitles.

 

 

Output from conversion (ps - these are fake subs from the film Solo - just used for testing )  :-

 

[script Info]
; Script generated by FFmpeg/Lavc57.66.101
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288
 
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
 
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:03:25.25,0:03:27.13,Default,,0,0,0,,normal:Look who we have here.
Dialogue: 0,0:03:32.30,0:03:33.93,Default,,0,0,0,,{\b1}bold:You have our money?{\b0}
Dialogue: 0,0:03:38.47,0:03:39.47,Default,,0,0,0,,{\i1}italic:Search him.{\i0}
Dialogue: 0,0:03:41.06,0:03:43.40,Default,,0,0,0,,{\u1}underline:Not if I shoot you.{\u0}
Dialogue: 0,0:03:46.00,0:03:50.46,Default,,0,0,0,,{\c&H808080&}colour:Coaxium is precious.{\c}
Dialogue: 0,0:03:55.25,0:03:57.13,Default,,0,0,0,,normal:again

 

These ALL work fine - happy days  :)

 

 

Nice idea.

However it's not practical for me with a large set of media files.

Besides, the generated ASS file has default font size and white colour which is very hard (i.e. too bright) to watch on an OLED TV.

FFMPEG converter does not allow to override the defaults (unless one changes the sources and recompiles) which means EACH ASS file has to be edited.

 

Real solution is to fix the Emby App to provide font size and colour selection for subtitles.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...