Jump to content


Photo

Status on official LG app

LG app official

  • Please log in to reply
537 replies to this topic

#481 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 30 March 2019 - 05:18 AM

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


  • SamES likes this

#482 rbjtech ONLINE  

rbjtech

    Advanced Member

  • Members
  • 455 posts
  • Local time: 10:01 PM
  • LocationLondon, UK

Posted 30 March 2019 - 09:16 AM

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, 30 March 2019 - 10:19 AM.

  • Nightsax likes this

#483 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 30 March 2019 - 11:43 AM

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

#484 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 03:41 AM

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? :-)

#485 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 03:49 AM

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

#486 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 11:05 AM

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...


  • rbjtech likes this

#487 rbjtech ONLINE  

rbjtech

    Advanced Member

  • Members
  • 455 posts
  • Local time: 10:01 PM
  • LocationLondon, UK

Posted 31 March 2019 - 11:57 AM

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 ..  ;)



#488 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 12:36 PM

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



#489 dnanielsen OFFLINE  

dnanielsen

    Advanced Member

  • Members
  • 96 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 02:23 PM

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? 



#490 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 31 March 2019 - 04:19 PM

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, 31 March 2019 - 04:21 PM.


#491 rbjtech ONLINE  

rbjtech

    Advanced Member

  • Members
  • 455 posts
  • Local time: 10:01 PM
  • LocationLondon, UK

Posted 31 March 2019 - 06:09 PM

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.



#492 dnanielsen OFFLINE  

dnanielsen

    Advanced Member

  • Members
  • 96 posts
  • Local time: 11:01 PM

Posted 01 April 2019 - 02:49 AM

@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. 

 

Attached File  IMG_20190401_083239.jpg   128.26KB   3 downloads

 

@rbjtech

It's WebOS 3.5



#493 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 01 April 2019 - 05:38 AM

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

#494 rbjtech ONLINE  

rbjtech

    Advanced Member

  • Members
  • 455 posts
  • Local time: 10:01 PM
  • LocationLondon, UK

Posted 01 April 2019 - 10:47 AM

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.n...a/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, 01 April 2019 - 10:52 AM.


#495 pastorn OFFLINE  

pastorn

    Member

  • Members
  • 27 posts
  • Local time: 11:01 PM

Posted 01 April 2019 - 12:47 PM

There’s also a difference in how the color is specified, 4 channels instead of 3 (8 digits)

/Martin

#496 dnanielsen OFFLINE  

dnanielsen

    Advanced Member

  • Members
  • 96 posts
  • Local time: 11:01 PM

Posted 01 April 2019 - 02:00 PM

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, 01 April 2019 - 02:01 PM.


#497 dnanielsen OFFLINE  

dnanielsen

    Advanced Member

  • Members
  • 96 posts
  • Local time: 11:01 PM

Posted 06 April 2019 - 06:33 AM

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? 



#498 rbjtech ONLINE  

rbjtech

    Advanced Member

  • Members
  • 455 posts
  • Local time: 10:01 PM
  • LocationLondon, UK

Posted 06 April 2019 - 12:41 PM

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.



#499 dnanielsen OFFLINE  

dnanielsen

    Advanced Member

  • Members
  • 96 posts
  • Local time: 11:01 PM

Posted 08 April 2019 - 03:19 AM

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, 08 April 2019 - 03:28 AM.


#500 macnb OFFLINE  

macnb

    Advanced Member

  • Members
  • 57 posts
  • Local time: 10:01 PM

Posted 15 April 2019 - 04:31 PM

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.







Also tagged with one or more of these keywords: LG, app, official

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users