After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606305 - Samsung subtitles
Samsung subtitles
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Zeeshan Ali
Depends on:
Blocks:
 
 
Reported: 2010-01-07 12:14 UTC by Andreas Henriksson
Modified: 2010-04-07 23:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hacky proof of concept (1.04 KB, patch)
2010-01-26 20:21 UTC, Andreas Henriksson
needs-work Details | Review
Self-hosting subtitle support. (5.33 KB, patch)
2010-03-12 16:20 UTC, Andreas Henriksson
none Details | Review
"thumbnailified" subtitle support for rygel 0.5 (19.21 KB, patch)
2010-03-30 12:20 UTC, Andreas Henriksson
none Details | Review
samsung subtitles for rygel git. (19.42 KB, patch)
2010-03-30 15:08 UTC, Andreas Henriksson
none Details | Review
samsung subtitle support (20.06 KB, patch)
2010-03-31 16:25 UTC, Andreas Henriksson
none Details | Review

Description Andreas Henriksson 2010-01-07 12:14:50 UTC
According to rumours in the Internet, Samsung TVs with DLNA supports playing subtitles when used with the original proprietary samsung dlna server (for windows only). I'm very much interested in this feature.

wireshark/tcpdump logs is available in this bug:
http://coherence.beebits.net/ticket/248

Basically, the DIDL-Lite needs to contain a "CaptionInfoEx" element as this example shows:
http://ps3mediaserver.org/forum/viewtopic.php?f=6&t=3811

I've spotted my TV sending "getCaptionInfo.sec: 1" header in the http HEAD request, which is probably the signal for when to include this extra information.
Comment 1 Andreas Henriksson 2010-01-07 13:45:02 UTC
relevant HTTP headers (request/response) extracted from the tcpdump in coherence ticket 248:

HEAD /V_D_0001_9_27.AVI HTTP/1.0
getCaptionInfo.sec: 1


HTTP/1.1 200 OK
Server: Samsung HTTP streaming server
Content-Type: video/x-msvideo
Content-Length: 366865672
Cache-Control: no-cache
contentFeatures.dlna.org:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000
CaptionInfo.sec: http://172.16.0.6:53235/V_D_0001_9_27.SRT


....


GET /V_D_0001_9_27.SRT HTTP/1.0
HOST: 172.16.0.6:53235
ACCEPT-LANGUAGE: en-us
getcontentFeatures.dlna.org:1
transferMode.dlna.org:Background


HTTP/1.1 200 OK
Server: Samsung HTTP streaming server
Content-Type: smi/caption
Content-Length: 44846
Cache-Control: no-cache
contentFeatures.dlna.org:DLNA.ORG_OP=00;DLNA.ORG_CI=0;
transferMode.dlna.org:Background
Comment 2 Andreas Henriksson 2010-01-26 20:21:49 UTC
Created attachment 152340 [details] [review]
hacky proof of concept

This patch adds a hardcoded header to the reply when "CaptionInfo" is requested.
By putting a subtitle file on my web server pointed to by the hardcoded location, I was able to verify that my samsung tv showed the subtitles when playing a(ny) movie.
Comment 3 Andreas Henriksson 2010-03-12 16:20:34 UTC
Created attachment 155982 [details] [review]
Self-hosting subtitle support.

Initial implementation where rygel itself actually serves the subtitle file.
Comment 4 Zeeshan Ali 2010-03-13 03:00:41 UTC
Excelent work Andreas! Since I don't have this TV, I'm glad you already provided a patch that works for you. :) Having said that the patch needs some work before it could be merged:

* All new development is supposed to happen in 0.5.x branch. 0.4.x is only for backporting of (critical) bug fixes. So please provide a patch against git master.

* The patch doesn't seem to be complete: You are passing an extra argument to SeekableResponse constructor but I don't see anything in the patch about the handling of this new argument.

* You are doing some synchronous I/O (f.query_exists call) and that can cause performance bottlenecks. In that context you can't do any async I/O, yes but we can change the needed methods to be async.

* Please follow the project's coding-style: http://live.gnome.org/Rygel/CodingStyle

* Please put separate changes in separate commits and use `git format-patch` to create the patches.

* I really would like this to be handled very similarly to how thumbnails are being handled.

  OK OK I stop whining now. :)
Comment 5 Andreas Henriksson 2010-03-30 12:20:07 UTC
Created attachment 157475 [details] [review]
"thumbnailified" subtitle support for rygel 0.5

Subtitle support for Samsung DLNA TV, implemented in similar fashion to the thumbnail support.
Comment 6 Andreas Henriksson 2010-03-30 15:08:44 UTC
Created attachment 157502 [details] [review]
samsung subtitles for rygel git.

Slightly improved version of the "thumbnailified" samsung subtitle patch.

This version includes a few minor tidy-ups and also adds the "sec:CaptionInfoEx" element to the DIDLLite.
Comment 7 Andreas Henriksson 2010-03-31 16:25:12 UTC
Created attachment 157610 [details] [review]
samsung subtitle support

This version of the patch should be ready for merge.
Comment 8 Zeeshan Ali 2010-04-07 23:33:42 UTC
commit ec9c6b677889a9cae11c066f260aa56a2086ea3a
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Thu Apr 8 02:19:47 2010 +0300

    core: Add basic support for subtitles
    
    For each video item, we check if there is a file in the same directory
    with the same name but extension "srt" and if so, we serve it using
    Samsung's custom DIDL-Lite and HTTP extensions.
    
    Co-author & reviewer: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>