Jump to content


Photo

DLNA support of external subtitles

dlna subtitles external support

Best Answer Luke , 15 January 2015 - 01:57 AM

ok, i've checked in some changes that should cause SubtitleFormat to get populated. great investigative work on your part!

Go to the full post


  • Please log in to reply
34 replies to this topic

#21 Serios OFFLINE  

Serios

    Advanced Member

  • Members
  • 76 posts
  • Local time: 07:43 AM

Posted 14 January 2015 - 08:13 PM

Ok If i replace SubtitleFormat with stream.Codec which subtitle resolver is returning as part of subtitle stream it's working, but since I'm not a c# developer, not sure if that is the proper way to be done. Please dev guys, any comment on this will really be good.



#22 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138124 posts
  • Local time: 03:43 AM

Posted 14 January 2015 - 10:33 PM

before even worrying about the profile, you should verify the subs are being burned in via transcoding. that's step 1. then after that you can optimize the profile to deliver them in a more efficient way.

 

skimming through page 1 it appears you've already done that, although if not, then you need to go back and start from there.

 

once you've verified basic support via burning them in, then you can use the profile editor to add a subtitle profile to indicate the format(s) the player can support.



#23 Serios OFFLINE  

Serios

    Advanced Member

  • Members
  • 76 posts
  • Local time: 07:43 AM

Posted 15 January 2015 - 01:34 AM

Well, in my previous posts I said that's all done. Subtitles are working via transcoding and in web player, also I setup my dlna profile and it's working. The point that subtitles are not properly loaded or subtitle file is not found etc etc is not in the matter here, since when I tweaked the code as I mention in my previous post "...replace SubtitleFormat with stream.Codec...", managed to get them working quite well. I also should mention, that to trace the problem up to the AddSubtitle method I tweaked the DidlBuilder.css to return in the log the AddSubtitleElement method parameters, just to check exactly that thing, you had in mind. Yes, I also doubted, that subtitle file is loaded at all, but after checking the log, any doubt was cleared, the subtitle file is loaded, so for every subtitle stream I got in the log:
 
This is before SubtitleFormat change...

Debug - UpnpContentDirectory: Test stream Url: http://192.168.1.50:8096/mediabrowser/Videos/9c0469a0120372b22bb6e890b5a9fad3/9c0469a0120372b22bb6e890b5a9fad3/Subtitles/2/0/Stream.
Debug - UpnpContentDirectory: Test stream IsForced: False
Debug - UpnpContentDirectory: Test stream Language: bul
Debug - UpnpContentDirectory: Test stream Name: bul
Debug - UpnpContentDirectory: Test stream Format: 
...

 
This is after replacing SubtitleFormat with stream.Codec

Debug - UpnpContentDirectory: Test stream Url: http://192.168.1.50:8096/mediabrowser/Videos/9c0469a0120372b22bb6e890b5a9fad3/9c0469a0120372b22bb6e890b5a9fad3/Subtitles/2/0/Stream.srt
Debug - UpnpContentDirectory: Test stream IsForced: False
Debug - UpnpContentDirectory: Test stream Language: bul
Debug - UpnpContentDirectory: Test stream Name: bul
Debug - UpnpContentDirectory: Test stream Format: srt
...

I also created subtitles files with ass, ssa, sub extensions just to test is this working properly and it is. With sub file although, it triggering transcoding...

 

So again, I don't think the problem is in the dlna profile for the device or that MB doesn't get the subtitle file, the problem is that SubtitleFormat is never returned so in DidlBuilder this:

 

var subtitleProfile = _profile.SubtitleProfiles
                .FirstOrDefault(i => string.Equals(info.Format, i.Format, StringComparison.OrdinalIgnoreCase) && i.Method == SubtitleDeliveryMethod.External);

is always null, which brings us here:

            if (subtitleProfile == null)
            {
                return;
            }

And no subtitle stream is added to the xml :)


  • HomerS likes this

#24 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138124 posts
  • Local time: 03:43 AM

Posted 15 January 2015 - 01:48 AM

great work. you don't actually want to use codec in place of SubtitleFormat, because Codec is the input, the subtitle format is the output. so we need to figure out why SubtitleFormat is empty



#25 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138124 posts
  • Local time: 03:43 AM

Posted 15 January 2015 - 01:57 AM   Best Answer

ok, i've checked in some changes that should cause SubtitleFormat to get populated. great investigative work on your part!


  • Serios likes this

#26 Serios OFFLINE  

Serios

    Advanced Member

  • Members
  • 76 posts
  • Local time: 07:43 AM

Posted 15 January 2015 - 07:41 AM

I'm really really happy this is resolved, now at last can get rid of Serviio, since using it only to play movies with subtitles and quite annoys me as is kind of stiff and never liked it in first place :)

It was quite hard since I'm not ever close to c# developing, but I'm php developer and years training in code logic gives me some advantage :) as you see from my pity tries for debugging :)

 

I will refine the dlna profile a bit, and then will posted in in Dlna section to be available for other users, and if dev team want to used it, to officially support LG WebOS series tv's. Since according to manufacturer there are 5 mil copies sold for 2014, and this dlna profile is applicable for all tv's with this OS.

 

Thanks again Luke :)


  • Beardyname likes this

#27 HomerS OFFLINE  

HomerS

    Advanced Member

  • Members
  • 42 posts
  • Local time: 09:43 AM

Posted 15 January 2015 - 12:38 PM

Ok , so I tried out the latest dev build Version 3.0.5493.2287 and it is an improvement in one way. With a DLNA profile with a subtitle profile for SRT I can now enjoy subtitles without transcoding on my LG 55LA640V  :D

 

 

On the downside , .sub subtitles does not play even when added to the DLNA profile and transcoding kicks in but the transcoding log is full of rows like this one :

 

sub2video: rectangle overflowing
frame=  630 fps=209 q=-1.0 size=   24249kB time=00:00:26.49 bitrate=7498.9kbits/s    
sub2video: rectangle overflowing
frame=  742 fps=211 q=-1.0 size=   29231kB time=00:00:31.22 bitrate=7668.5kbits/s    
sub2video: rectangle overflowing
frame=  854 fps=212 q=-1.0 size=   33991kB time=00:00:35.83 bitrate=7770.5kbits/s    
sub2video: rectangle overflowing
 
 
Removing all subtitle profiles from DLNA also doesn't behave as expected , when play a media that has a srt subtitle not transcoding is happening and therefore no subtiles are displayed over DLNA, so the update must have broken someting.

Edited by HomerS, 15 January 2015 - 01:34 PM.


#28 Serios OFFLINE  

Serios

    Advanced Member

  • Members
  • 76 posts
  • Local time: 07:43 AM

Posted 15 January 2015 - 04:59 PM

There was a problem with .sub files even before these changes, Luke made. I don't remember in which post particularly but have memories, that some users mention it.


Edited by Serios, 15 January 2015 - 05:00 PM.


#29 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138124 posts
  • Local time: 03:43 AM

Posted 15 January 2015 - 08:51 PM

Well done here

#30 HomerS OFFLINE  

HomerS

    Advanced Member

  • Members
  • 42 posts
  • Local time: 09:43 AM

Posted 16 January 2015 - 03:26 AM

There was a problem with .sub files even before these changes, Luke made. I don't remember in which post particularly but have memories, that some users mention it.

 

 

Yes I know that transcoding with .sub wasn't working before but with this latest release I can't get transcoding to work with .srt as transcoding never kicks in, not that I need it now when direct play works but not everyone have a dlna device capable of subtitles.

 

Does .sub subtitles work with your LG WebOS tv now ?   I have an older LG that is supposed to support .sub but when I add that to my DLNA profile it still gets transcoded and as you know that doesn't work.



#31 Serios OFFLINE  

Serios

    Advanced Member

  • Members
  • 76 posts
  • Local time: 07:43 AM

Posted 16 January 2015 - 06:26 AM

Yes I know that transcoding with .sub wasn't working before but with this latest release I can't get transcoding to work with .srt as transcoding never kicks in, not that I need it now when direct play works but not everyone have a dlna device capable of subtitles.

 

Does .sub subtitles work with your LG WebOS tv now ?   I have an older LG that is supposed to support .sub but when I add that to my DLNA profile it still gets transcoded and as you know that doesn't work.

 

I can confirm, that with subtitle profiles removed, still transcoding never kicks in, even if user profile have subtitle mode set to "always play subtitles".

Also items with .sub files, triggers transcoding even if .sub is defined in subtitle profiles and transcoding fails.

 

Another thing i noticed is that MB suddenly requires subtitles files to be with UTF8 encoding. And if they are not in transcode log:

Invalid UTF-8 in decoded subtitles text; maybe missing -sub_charenc option

  • HomerS likes this

#32 HomerS OFFLINE  

HomerS

    Advanced Member

  • Members
  • 42 posts
  • Local time: 09:43 AM

Posted 16 January 2015 - 07:37 AM

 

I can confirm, that with subtitle profiles removed, still transcoding never kicks in, even if user profile have subtitle mode set to "always play subtitles".

 

Thanks for confirming , I hope luke can un-break this again before it goes to beta.

The other issue with .srt and  invalid UTF-8 is not new to me , this has been an issue since subtitles support was introduced with transcoding and it can prove to be hard to solve as it is hard to detect the encoding of a text file in a reliable way.

 

 

Also items with .sub files, triggers transcoding even if .sub is defined in subtitle profiles and transcoding fails.

 

This is good news at least for me , that means that whatever changes luke made to get .srt  subtiltes handled could be done for .sub as well as long as the DLNA profile supports it.



#33 rodrigoxm49 OFFLINE  

rodrigoxm49

    Newbie

  • Members
  • 8 posts
  • Local time: 08:43 AM

Posted 23 January 2015 - 12:01 PM

Where you guys are making these changes? No subtitles on DLNA here too (2012 LG TV or 2013 Philips TV).


Edited by rodrigoxm49, 23 January 2015 - 12:41 PM.


#34 vibhav.mulay OFFLINE  

vibhav.mulay

    Newbie

  • Members
  • 3 posts
  • Local time: 01:13 PM

Posted 27 February 2016 - 08:01 AM

Sorry for bumping up the old thread, but the external subtitles are still not working on DLNA - Philips HTS3564

 

I currently have the latest dev build - 3.0.5901.1320

 

I have the DLNA profile configured correctly. I can see the subtitles in the Web UI as external. Also if I play in the browser, the subtitles do show up.

 

Any idea why this is happening?


Edited by vibhav.mulay, 27 February 2016 - 08:01 AM.


#35 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138124 posts
  • Local time: 03:43 AM

Posted 27 February 2016 - 01:03 PM

Sorry for bumping up the old thread, but the external subtitles are still not working on DLNA - Philips HTS3564

 

I currently have the latest dev build - 3.0.5901.1320

 

I have the DLNA profile configured correctly. I can see the subtitles in the Web UI as external. Also if I play in the browser, the subtitles do show up.

 

Any idea why this is happening?

 

Hi there, welcome. In order to best help you, please see how to report a media playback issue. Thanks.







Also tagged with one or more of these keywords: dlna, subtitles, external, support

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users