GNOME Bugzilla – Bug 606305
Samsung subtitles
Last modified: 2010-04-07 23:33:42 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.
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
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.
Created attachment 155982 [details] [review] Self-hosting subtitle support. Initial implementation where rygel itself actually serves the subtitle file.
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. :)
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.
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.
Created attachment 157610 [details] [review] samsung subtitle support This version of the patch should be ready for merge.
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>