Subtitles (.srt) with DSM-320 and Mediatomb?

2006-02-16
2013-05-30
<< < 1 2 (Page 2 of 2)
  • Well, back to packet sniffing then. I'm not in the mood right now to disassemble a 3Mb arm executable, even though I'm not under a DMCA oppressive regime - at least I think the EU still allows code disassembly and reverse engineering.

    At least I can still chekc with ldd, it's interesting that the dmaosd app is dynamically lincked to the following libs:
            librmcaribbeanapi.so => not found
            libmatrixssl.so => not found
            libdl.so.0 => /opt/toolchain/arm/gcc-3.2/toolchain/lib/libdl.so.0
            libm.so.0 => /opt/toolchain/arm/gcc-3.2/toolchain/lib/libm.so.0
            libpthread.so.0 => /lib/libpthread.so.0
            libc.so.0 => /opt/toolchain/arm/gcc-3.2/toolchain/lib/libc.so.0
            libc.so.6 => /lib/libc.so.6
            ld-linux.so.2 => /lib/ld-linux.so.2
            /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0

    And other two apps (mms and DMAREnder) to these:
            libpthread.so.0 => /lib/libpthread.so.0
            libm.so.0 => /opt/toolchain/arm/gcc-3.2/toolchain/lib/libm.so.0
            libc.so.0 => /opt/toolchain/arm/gcc-3.2/toolchain/lib/libc.so.0
            libc.so.6 => /lib/libc.so.6
            ld-linux.so.2 => /lib/ld-linux.so.2
            /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0

    Are these all LGPL?

    There are only two libs there that are in the cramfs image and not in the ramdisk, and for one (librmcaribbeanapi.so) I could only find a query from a chinese programmer with problems linking it, no description or anything, so probaby it was developed in-house by DLink. As for libmatrixssl.so - this is from PeerSec (www.matrixssl.org) and dual-licensed, so we can assume DLink bought a comercial version.

     
  • Jin
    Jin
    2007-02-27

    .srt subtitles are now supported :>

    Thanks to morganw, who figured out what to set in the XML description in order to trick the DSM-320.

    Add this to the <server> section in your config.xml:
    <manufacturerURL>http://redsonic.com</manufacturerURL>

    Also don't forget to set:
    <custom-http-headers>
        <add header="X-User-Agent: redsonic"/>
    </custom-http-headers>

    Next, name your .srt file the same way as your movie, just replace the .avi extension with .srt, place both files in the
    samy directory on your harddrive.
    i.e.:
    /mymovies/movie1.avi
    /mymovies/movie1.srt

    Then add movie1.avi to the database, fire up your DSM and see if it works :>

    Please report success or failure!

    Greetings,
    Jin

     
  • benhurstein
    benhurstein
    2007-03-09

    I tried it, but it doesn't seem to work with my DSM-520.
    It changes behaviour when ManufacturerURL is added -- the
    first screen is the same as when served by dlink's server
    (Music/Photo/Video), but unfortunately it does not request
    the srt file (I searched for "srt" in the wireshark packets
    and found nothing).
    I'm using 0.9.0pre, do I have to take it from svn?

    Thanks,
    Benhur

     
  • Jin
    Jin
    2007-03-09

    no, the 0.9.0pre should be OK. maybe we are still missing something... the user who figured this out has a DSM-520, I only have access to the DSM-320.

    I will recheck. You could try also setting the <model>PC-MediaServer-DSM</model> but as far as I remember the redsonic manufacturer stuff was enough; at least I had it working.. hmm.

    I'll try it again and report back.

    Greetings,
    Jin

     
  • benhurstein
    benhurstein
    2007-03-09

    Thanks.

    I tested with the <model> thing, and it did not change anything.

     
  • Jin
    Jin
    2007-03-22

    Hi,

    sorry for the late response. I tested it again, the trick seems to be to use
    <manufacturerURL>redsonic.com</manufacturerURL>
    without the "http://" thing. So I was wrong in my last post, I guess I did not think that it would make a difference.

    I then get a weird message when starting the DSM320, it tells me to upgrade
    my PC software (I think it may be because we do not have those MUSIC/VIDEO/etc. objectID mappings on the
    server, planned for a future release), but apart from the I can browse and play stuff, and subtitles work,
    have it running right now.

    Could you please retry with the setting above?

    Thanks,
    Jin

     
  • Jin
    Jin
    2007-03-23

    BTW, the DSM320 unit I tested with has firmware version 1.09.

     
  • Jin
    Jin
    2007-03-25

    after more investigation, it seems that the "http://" thing is not important at all, just "redsonic.com" needs to be there in some form. I also looked at TVersity, they have settings for various renderers; I could see that when configuring TVersity for the DSM-320 they set the model number to the version of the D-Link server. However, I wonder why subtitles worked for me without this setting (tried with a U.S. unit, firmware 1.09, with redsonic in the manufacturerURL)

     
  • With the instructions given in this thread, I was able to get subtitles working for the DSM-520 on a Slug(NSLU2) running Unslung, yay!
    Basically, I added
      <manufacturerURL>redsonic.com</manufacturerURL>
    and
      <custom-http-headers>
        <add header="X-User-Agent: redsonic"/>
      </custom-http-headers>
    to the config.xml, and things just worked, aside from the annoying 'update PNP server software' message (anyone gotten around that?).

    One thing I see is the following console trace if a video file does *NOT* have a equally named .srt file:
    Exception raised in [../src/file_request_handler.cc:346] open(): Failed to stat /video/movies/mymovie.srt
    _STRACE_ 0 /lib/libpthread.so.0 [0x401c93dc]

    The server keeps running, however, so I wonder if this is benign and can be ignored.

    Here the info:
    # ipkg info mediatomb
    Package: mediatomb
    Version: 0.9.0-pre-2
    Depends: file, ossp-js, libexif, sqlite, zlib, id3lib, libstdc++
    Status: install user installed
    Section: multimedia
    Architecture: armeb
    maintainer: NSLU2 Linux <nslu2-linux@....com>
    MD5Sum: e3076d0810679fd95308f64645993c22
    Size: 540507
    Filename: mediatomb_0.9.0-pre-2_armeb.ipk
    Source: http://easynews.dl.sf.net/sourceforge/mediatomb/mediatomb-0.9.0-pre.tar.gz
    Description: UPnP AV Mediaserver for Linux.

    # uname -a
    Linux linky 2.4.22-xfs #1 Mon Apr 10 18:17:11 PDT 2006 armv5b unknown

    Great software, thanks for this. Keeps the place quieter since I don't have to run some fat PC all the time. One wish, tho, as far as the calls for on-the-fly re-encoding go: please keep that an option, since the Slug won't have the power or memory to do that.

    Thanks,
    -Th

     
    • mechgt
      mechgt
      2007-12-26

      I've installed 0.10, and updated my config.xml file, but cannot get subtitles working on my DSM-520.
      Anyone else have subtitles working on a 520 (fw v1.05) with MediaTomb 0.10?

      Here's what I've got:
      config.xml:
      ---------------------------------------------
      <server>
      ...
          <custom-http-headers> 
            <add header="X-User-Agent: redsonic"/> 
          </custom-http-headers> 
      ...
          <manufacturer>D-Link Systems Inc.</manufacturer> 
          <manufacturerURL>http://www.redsonic.com</manufacturerURL> 
          <modelDescription>UPnP/AV 1.0 Compliant Media Server</modelDescription> 
          <modelName>PC-MediaServer-DSM</modelName> 
          <modelNumber>105</modelNumber>
      </server>
      ---------------------------------------------

      DSM-520 running firmware version 1.05 (newest firmware released Oct'07 that added ActiveTV)
      MediaTomb 0.10

      /movies/movie.avi
      /movies/movie.srt

       
      • mechgt
        mechgt
        2007-12-27

        Well, I got it working, so the D-Link DSM-520 fw 1.05 will play subtitles with MediaTomb 0.10, but have no idea what the culprit was.  Really the only thing I found was that I must have:

        <manufacturerURL>http://www.redsonic.com</manufacturerURL>
          (http://www. was totally necessary for me in the manufacturerURL, redsonic.com alone did not work for me)

        I otherwise used the same thing I had in the earlier post:

        <manufacturer>D-Link Systems Inc.</manufacturer> 
        <manufacturerURL>http://www.redsonic.com</manufacturerURL> 
        <modelDescription>UPnP/AV 1.0 Compliant Media Server</modelDescription> 
        <modelName>PC-MediaServer-DSM</modelName> 
        <modelNumber>105</modelNumber>

        in fact, I just now copied and pasted that exactly from my earlier post (http://sourceforge.net/forum/message.php?msg_id=4690410), and it seemed to work fine.  Some of those elements weren't necessary (manufacturer for instance), but that's what I've got now and it's working.

        Thanks for the replies!!! MediaTomb is quite awesome by the way!!!  Now the old lady won't complain that none of my movies have subtitles anymore!!!

        -->Does MediaTomb store whether or not .srt subtitle files exist for a given movie, or is it more on the fly, by request from a client?

        By the way... here's what I got from Wireshark:
        -----------------------------------------
        <?xml version="1.0" encoding="utf-8"?>
        <root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
        <specVersion>
        <major>1</major>
        <minor>0</minor></specVersion>
        <device>
        <dlna:X_DLNADOC>DMS-1.00</dlna:X_DLNADOC>
        <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
        <INMPR03>1.0</INMPR03>
        <friendlyName>Curtis Media</friendlyName>
        <manufacturer>D-Link Systems Inc.</manufacturer>
        <manufacturerURL>http://www.redsonic.com</manufacturerURL>
        <modelDescription>UPnP/AV 1.0 Compliant Media Server</modelDescription>
        <modelName>PC-MediaServer-DSM</modelName>
        <modelNumber>105</modelNumber>
        <serialNumber>0000001</serialNumber>
        <UDN>uuid:ba363f52-ce5e-7abe-d5ff-697dc7d80e58</UDN>
        <serviceList>
        <service>
        <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:CMGR_0-99</serviceId>
        <SCPDURL>ConnectionManager/scpd.xml</SCPDURL>
        <controlURL>ConnectionManager/control</controlURL>
        <eventSubURL>ConnectionManager/event</eventSubURL></service>
        <service>
        <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:CDS_0-99</serviceId>
        <SCPDURL>ContentDirectory/scpd.xml</SCPDURL>
        <controlURL>ContentDirectory/control</controlURL>
        <eventSubURL>ContentDirectory/event</eventSubURL>
        </service>
        </serviceList>
        </device>
        </root>
        -----------------------------------------

         
        • kokiperex
          kokiperex
          2008-11-27

          Nice! I added that lines to my config file and now the subtitles work!

          ...but I have a problem, some subtitles lines are missing. If the character speaks fast the DSM doesn't show some lines (I've test the same video on my PC and the subtitles are OK).

          Any idea?

           
          • Jin
            Jin
            2008-11-27

            This question is for the guys who developed the DSM-320 firmware, we just serve the subtitle file here, that's all.

            Kind regards,
            Jin

             
  • Jin
    Jin
    2007-04-19

    Finally a success story! :)

    Try adding <modelNumber>105</modelNumber> to get rid of the "update UPnP server software" message on the DSM.

    Ignore the exception, actually we should upgrade from 0.9.0-pre to 0.9.0 on NSLU2 Linux, the released version does no longer print that.(The DSM makes an .srt request for each video file, and we just printed out that the file with that name is not available).

    And also great to hear that it works on the NSLU2, we have been waiting for feedback on that for quite some time, we do not have this unit, so we were not able to test on it. One thing that still
    needs to be tested on the NSLU is largefile support. The currently available package has largefile disabled, if you are willing to try I could make an ipk with enabled lfs for you when I come back from holidays (this weekend).

    Regarding the transcoding feature: we always try to stay as configurable as possible, so transcoding will be available as a configure option and will not be forced upon everyone :)

    Thanks for the feedback!

    Greetings,
    Jin

     
    • Hi,

      just trying that <modelNumber>105</modelNumber> setting.

      Funny enuff, when I posted the last time, I was ready to open another topic on something that bugged me about slug/mediatomb, but I wasn't able to reproduce that at the time. As Murphy has it, trying to get that above setting in (after running mediatomb/slug for a few days *using* it), seems I can finally reproduce the problem which is that I cannot shut mediatomb down in a clean way.
      [my use case]
      I started mediatomb not in deamon mode, but in a console on a FreeBSD box that stayed up all along. It was running for at least 7 days, and served up a few dozen videos at least. The reason I bring that up is because i cannot reproduce whats there below by just starting things anew and serving one or a few videos.

      trying to shut down mediatomb on the slug console is like:
      * first Ctl-C
      2007-04-21 00:46:24    INFO: MediaTomb shutting down. Please wait...
      * second Ctl-C
      2007-04-21 00:49:32    INFO: Mediatomb still shutting down, signal again to kill
      * third Ctl-C                                              .
      2007-04-21 00:53:25   ERROR: Clean shutdown failed, killing MediaTomb!

      its still running, tho after (in another console):
      # date
      Sat Apr 21 01:19:58 PDT 2007

      but there isn't any noticable CPU or I/O activity on the slug.

      So, guess no choice but kill -9 all the instances of mediatomb running.
      If I do so, I think there is a 80+% chance that sqllite gets corrupted (to get arounf that, I just copy the .db file and there is a good chance it'll start afterwards)

      Any chance to fix that? I don't care too much about the big file support (to be honest, I don't have the bandwidth to test it, but I'll be more than happy to contribute otherwise), I'd be willing to send you a Slug pre-configured (if the shipment is reasonable) to figure whats going on here. In the end, the Slug is yours, and I'll help you to set it up.

      Dunno, would that work for you?
      -Th

      Heya, and the <modelNumber>105</modelNumber> works in the end, cooolio!

       
  • Jin
    Jin
    2007-04-22

    Hi,

    maybe we should take this to another thread... anyway. We are aware of the shutdown problem, we were not able to fix it yet. It is definetely related to the fact that we are running on ARM (could be a glibc issue), this does not happen on x86 systems. Things are pretty weird, we were able to identify two error cases:

    1. the hangup occured after the exit() call... I really can not explain that, all our code is terminated at this point and we called the exit function to terminate the program.

    2. a thread in libupnp was hanging around, so the call to shutdown the upnp library somehow did not work out and kept hanging.

    Hacking libupnp is always a pain, but I think we can fix 2., at least we will try. As for 1. - we have no idea why this is happening, so I guess we will try to find someone with a deeper glibc/system knowledge who might have a clue.

    As for the Slug offer: of course it would be great if we had a Slug, would make testing easier. However, we are able to reproduce this problem (at least we believe that it is indeed the same issue) on a similar piece of hardware that we have (ARM system running Debian). Besides, allthough we are trying we can't guarantee that we will be able to fix it. So we leave the decision up to you :) We would really appreciate it, if you sponsored one, but being honest I have to say that we currently have a possibility to investigate this particular problem.

    Now, last word on the database corruption:
    did this already happen to your database, or are the 80% an assumption that it may happen? If your problem is indeed the same as described in 1. and 2., then the corruption should not happen. The reason is, that the hangup happens during/after shutdown, meaning that our code is no longer alive at that point and that the database is already closed. So that's a very important question - do you really observe database corruption?

    Greetings,
    Jin

     
  • Tatek
    Tatek
    2007-06-20

    Dear Jin,

    I've installed MediaTomb 0.9.1 on LinkStation Live (ARM9) running on FreeLink. The installation went well, fully automated via apt-get - at the end I was informed that MediaTomb is up and running.

    Then I wanted to enable subtitles in my DSM-320RD (firm 1.04.08eu). I modified <server> section of config.xml as it's described in this tread, but couldn't get any subs.

    I took the original tags from D-Link sever running on PC and put them to config.xml:
     
      <manufacturer>D-Link Systems Inc.</manufacturer>
      <manufacturerURL>http://www.redsonic.com</manufacturerURL>
      <modelDescription>UPnP/AV 1.0 Compliant Media Server</modelDescription>
      <modelName>PC-MediaServer-DSM</modelName>
      <modelNumber>105</modelNumber>
    and
      <custom-http-headers>
         <add header="X-User-Agent: redsonic" />
      </custom-http-headers>

    And bingo, subtitles appeared on my DSM-320RD !!!

    Thanks for the great software you've done! It's the only UPnP server which supports subtitles on DSM and can be installed on NAS.

     
  • Jin
    Jin
    2007-06-20

    Hi,

    thanks for the feedback!
    Actually, the settings for subtitles are described here:
    http://mediatomb.cc/pages/devices

    Just scroll down to the D-Link section, as far as I know the settings described there should be enough to enable subtitles on the DSM. I see that you added more tags, I am just curious - could you please test if you really need them, or if it will also work if you only add the tags described on our devices page? I'd like to know so I could update the documentation if it is not correct.

    Thanks!
    Jin

     
  • Tatek
    Tatek
    2007-06-21

    Hello Jin,

    I had started with the settings, which you provided in "Devices" section of the manual. But I couldn't get subtitles displayed on 320RD. I think that 320RD software is slightly different from 320 model. And this might be a reason that subs worked on 320&520 but not on my 320RD.

    I will examin which tags are really necessery and I'll let you know. Actually I'm about to start my short holidays, then I will have the results after 25th.

    Best Regards
    Tatek

     
  • Jin
    Jin
    2007-12-26

    I have a similar problem on the DSM-510, no matter what I did - I was not able to get subtitles going. I even tried the D-Link server, also tried Twonky and TVersity: no luck, subtitles were not requested. The changelog of the 510 firmware was saying that you need to press shift to enable subtitles, this did not work for me. I wonder if there is something similar for the 520...

     
    • mechgt
      mechgt
      2007-12-26

      I'm able to get subtitles working if I use the Windows D-Link media server (ver. 1.09) no problem, but not yet with MediaTomb.  I'm referencing the same media files through both servers, so I know the player is capable of playing them.

      How would I be able to see what's being passed between the D-Link media server... Ethereal?

       
  • Jin
    Jin
    2007-12-26

    the D-Link media server did not do the trick with the DSM-510, I tried everything but could not get it going.

    I still think that the trick is in the headers and in the device description, at least that's how others got it to work with the 520...

    Wireshark/Ethereal is good for checking the HTTP headers, also it's probably worth looking at the device description of the dlink server.

     
  • Shawn Olivo
    Shawn Olivo
    2008-04-11

    I am having the same problem with a DSM-520 /w firmware 1.06 (US). The D-link MediaLounge Server software (1.09) works w/ .srt fils, but MediaTomb will not. I have tried changing the config.xml file by adding the <manufacturerURL>redsonic.com</manufacturerURL> <modelNumber>105</modelNumber> but to no effect. I think the root of our problem is that "redsonic.com" no longer exists and d-link removed it from firmware 1.06. has anybody hacked the new firmware and found a better URL string?

     
  • Shawn Olivo
    Shawn Olivo
    2008-04-11

    Sorry all, I should have read the prior posts closer. mechgt you are a GOD sir!!! Your solution to the DSM-520 .srt issue worked like a dream.

     
<< < 1 2 (Page 2 of 2)