Jump to content
louis1

RS, external subtitles, DLNA and Samsung Smart TVs

Recommended Posts

louis1

Subtitle support for Samsung devices

 

Modern Samsung TVs are able to play movie with subtitles from DLNA server, but subtitles require some non-standard extensions of DLNA protocol. What it means: using standard DLNA server you can watch movie, though without subtitles.

This patch adds some of Samsung proprietary extensions, just enough for subtitles to work.

What it does:

1. When listing a folder, append non-standard <sec:CaptionInfoEx> tag to each video item. This tag servers only as a hint for Samsung client to check for subtitle download URL using HTTP HEAD method.

2. Before playing movie, Samsung device issues HTTP HEAD request on video item. In FileRequestHandler::get_info method we look for subtitle file and return it's download URL in CaptionInfo.sec header.

3. The device retrieves subtitles from URL provided in CaptionInfo.sec header. This is handled thanks to existing blind request feature.

 

 

Samsung Share Manager...aka Samsung Link can send via dlna movies and subtitles. look what it sends in a wireshark capture

 

<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp='urn:schemas-upnp-org:metadata-1-0/upnp/' xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"

xmlns:sec="http://www.sec.co.kr/"><item id="V_D_0000_9_376" parentID="V_D_0000_9" restricted="1">

<dc:title>VideoWithSubtitle.avi</dc:title>

<upnp:class>object.item.videoItem</upnp:class>

<sec:dcmInfo>CREATIONDATE=1253629219,FOLDER=01 - Sous-Titrés</sec:dcmInfo>

<dc:date>2009-09-22</dc:date>

<sec:CaptionInfoEx sec:type="srt">http://192.168.1.2:53235/V_D_0000_9_376.SRT</sec:CaptionInfoEx>

<res protocolInfo="http-get:*:video/x-msvideo:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000" size="733958196" duration="1:25:25">http://192.168.1.2:53235/V_D_0000_9_376.AVI</res>

<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00D00000000000000000000000000000">http://192.168.1.2:53235/V_D_0000_9_376.MTN</res>

<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00D00000000000000000000000000000">http://192.168.1.2:53235/V_D_0000_9_376.TMTN</res>

</item>

</DIDL-Lite>

 

the problem affects shared movies with external subtitles and the tv channels shared with recording service. none shows subtitles on samsung tv's

I guess uPnPProfilesV2.xml should support more customization.

 

Other related readings:

External subtitles #1

DLNA improvements - Subtitles, Movie Album Art, Search

Support of Samsung DLNA abilities

Media Play and DLNA

 

 

Share this post


Link to post
Derrick

 

I guess uPnPProfilesV2.xml should support more customization.

You're free to find out the appropriate profile yourself :)

Share this post


Link to post
louis1

You're free to find out the appropriate profile yourself :)

it''s not about finding the profile. the RS dlna server must be enhanced in order to support samsung's clients -> custom element-> CaptionInfoEx in BrowseResponse.

 

this is from mediatomb patch for adding samsung subtitles support to dlna server:

+Ref<Element> UpnpXML_DIDLRenderCaptionInfo(String URL) {

+ Ref<Element> cap(new Element(_("sec:CaptionInfoEx")));

+

+ // Samsung DLNA clients don't follow this URL and

+ // obtain subtitle location from video HTTP headers.

+ // We don't need to know here what the subtitle type

+ // is and even if there is a subtitle.

+ // This tag seems to be only a hint for Samsung devices,

+ // though it's necessary.

+

+ int endp = URL.rindex('.');

+ cap->setText(URL.substring(0, endp) + ".srt");

+ cap->setAttribute(_("sec:type"), _("srt"));

+

+ return cap;

+}

 

each mime type ->video is "enhanced" with samsung's way... .subtitle element

+ if (config->getBoolOption(CFG_SERVER_EXTEND_PROTOCOLINFO_SM_HACK))

+ {

+ if (mimeType.startsWith(_("video")))

+ {

+ element->appendElementChild(UpnpXML_DIDLRenderCaptionInfo(url));

+ }

+ }

+

log_debug("extended protocolInfo: %s\n", protocolInfo.c_str());

}

#endif

 

Edited by louis1

Share this post


Link to post
SimonP

I have a Samsung Smart TV and need subtitles so this looks interesting but I have no idea what to do with it! :) Could you explain where it is installed, and how, please? I looked at the Sourceforge link but I don't have a config.xml file that looks remotely relevant. (After a quick search, is it part of 'Samsung PC Share Manager'? I don't have it installed and hadn't heard of it before.)

 

I usually use Plex, which handles .srt and internal .mkv subtitles well but doesn't handle the subs inside .ts files so I have to rip them out before viewing my recordings, which is a real pain (I've asked the author of the Samsung app to look into this but there was no reply). For those in a similar situation, the latest versions of MKVmerge (which I usually use to merge subtitles into .mkv files) can now take the teletext subtitles in our .ts recordings and pass them through to the .mkv output, which is really nice.

Edited by SimonP

Share this post


Link to post
louis1

currently I'm using "Samsung Link" as a dlna server to view a folder with many HD movies, all having external subtitles. I have tried few other servers like Plex,Twonky,serviio, but none gave me subs on my samsung smart tv. I have succeeded with only 2 dlna servers: Samsung Link and Universal Media Server.

 

the code In my previous post it's a hint for the coders of RS, to see what they have to do :original: . it's part of mediatomb (another UPnP server, which it's open source).

 

unfortunately we don't have what to do untill the coders don't add support by directly coding into the RS.

Edited by louis1

Share this post


Link to post
SimonP

Have you tried using both the Plex server and the Plex app for Samsung Smart TVs? It displays the subtitles with .mkv (internal and external) and external .srt with most other formats very nicely. As I said, the only ones I've had trouble with are the subtitles in the .ts files that DVBv records and I have to either use ProjectX to rip them or, more recently, edit the file then run it through MKVmerge which creates a .mkv file with internal subtitles (as long as Teletext subs are broadcast).

Share this post


Link to post
louis1

never heard about plex app for samsung smart tv. the plex server was installed in my desktop no more than few minutes as I checked if the samsung tv can play subtitles from a shared movie folder inside plex. but this is not the subject of this topic. live tv channels also can't be seen with subtitles on samsung tv's...using RS and I guess it's the same cause.

Edited by louis1

Share this post


Link to post
Derrick

On a panasonic tv I can get dvb subtitles from the RS media server (live tv and recordings) via panasonic's Viera streaming renderer.

Share this post


Link to post
SimonP

You'll find the Plex app in the app store on the TV. The server side takes a lot of setting up but it's worth it and once done it works very well. I hoped that there might be some way of integrating DVBv/RS into it and I did ask, but there doesn't seem to be a way at present.

 

It is disappointing that the TV can't display subtitles from the RS feed but it can't display them in recordings either. The same is true for Plex (when using it as a straight DNLA server), which is why we need the app - not just as a front end but to do things like displaying subtitles - so it must be a limitation of the DLNA client in the TV.

 

Someone here (sorry, I've forgotten the name) has written an Android app that works beautifully and displays video and subtitles from the RS feed on our 'phones and tablets, maybe it could be ported to a Samsung app? Alternatively maybe there is a Samsung streaming app similar to the one Derrick referred to (just did a quick Google and DS Video looks as if might do it?).

Edited by SimonP

Share this post


Link to post
louis1

the player inside samsung tv it's somehow limited to display subtitles. today I was interested what kind of subtitles refuses to play. I recorded a small video and opened in VLC. the stream 2 it's defines as Subtitle. Codec - DVB Subtitle.

 

So...I searched what it's this format.

 

Subtitles are generated as a graphical bitmap and then encoded and compressed into the DVB delivery format). The subtitle data is multiplexed with the video, audio data and possibly other subtitle languages and then transmitted as part of the station’s output transport stream to the viewer’s decoder. Once a decoder receives the data the subtitle is re-constructed in the decoder’s memory. A user can select whether to display subtitles or not and, if available, which one of several languages. At the appropriate time the decoder will then display the subtitle on-screen.

 

I opened the the video in Subtitle Edit (software) and that's true. Those subtitles are small bitmaps. That program has an OCR method to get the text.

 

Why samsung's internal player refuses to show the dvb subs...we don't know.

Share this post


Link to post
Derrick

 

Why samsung's internal player refuses to show the dvb subs...we don't know.

..well, it doesn't refuse dvb subs in general. It works perfectly well with live tv via the internal tuner. Recordings made on an external HDD (alas with DRM) show subs as well but not via upnp streaming.

Share this post


Link to post
SimonP

All we can do it contact Samsung and ask them to fix it, although I did try once before and didn't get a reply. It is odd that it can show DVB-Subs on live TV but not offline files but I don't think there's anything we can do about it. My only solution is to rip the text subtitles out to .srt (or OCR the DVB-Subs) and then it works.

Share this post


Link to post
louis1

it would be nice to have a plugin to do that...for RS. I've searched samygo forum for this issue and found no hack or another way to enable DVB subs for internal dlna player. It's a problem which seems to affect the entire Samsung smart tv series A B C..F H etc. what's funny it's that...if I check add to stream "DVB subtitles" in RS UPNP server...the tv player shows the subtitle menu, with options disabled, only on/off enabled, which means that it has some checking routines inside. unchecking subs options..will make subtitle menu item disappear in tv player..

 

so..how do we capture the stream before RS sends it to its clients ...and get out the dvb sub...process it with OCR and make RS send captionEx tag inside soap response? :D

 

is there a C++ plugin skeleton for RS..something where to start?

Edited by louis1

Share this post


Link to post
DannyRO

Hello guys,

 

I have read out all your comments because i am interesting if till now somebody find out a solution, how to load the sub over DLNA. I bought a few days ago Samsung 6800 series and it seems that over DLNA subtitles are not loading, if i am connecting the HDD to Samsung over USB 3.0 from the back of the Samsung all subtitles are load perfectly. I am also using a LG and the sub are load perfectly over DLNA without any problems.

From my point of view it's very annoying to pay a lot of money and to don't be able to use their player over DLNA with subt that should supposed to work.

Does somebody received a feedback from Samsung? what are their solution, how they are seeing to solved this very quickly in future? do they have at least a solution which could be included in the new update of the firmware?

 

Thank you and please send me a feedback.!?

 

Danny

Share this post


Link to post
Derrick

..write to Samsung and tell them that you buy a different brand (e.g.) Panasonic which does show the subs ;)

Share this post


Link to post
DannyRO

Sorry but, If all of us we are thinking as you did probably nobody will by Samsung anymore and yes if i will not find a solution probably we will be on the same page but till then i will keep try.

My intention is not to write stories about Samsung or other brans is actually to find a solution and to watch movies with my wife and to drink a good wine but of course with sub.

Nevertheless, i never thought for 1s that Samsung are so obsolete regarding DLNA features.

Frankly spoken even if i am repeating myself, Does anyone have a solution how to solve my problem?

 

Thank you!

 

Danny

Share this post


Link to post
SimonP

The best thing (IMHO) is to run Plex on your 'server' PC and install the Plex app on your TV, then you'll get subtitles in most instances - they work for external .srt and internal text subtitles in .mkv files but not internal subs in .ts files. It offers a nice interface and you can install Plex apps on your 'phone/tablet and stream everything to them as well so it's a good all-round solution.

Share this post


Link to post

×
×
  • Create New...