http protocol not works right with DSM-320

jason
2005-05-07
2013-05-30
1 2 > >> (Page 1 of 2)
  • jason
    jason
    2005-05-07

    There is a problem when test mediatomb 0.7.1 with DSM-320 v1.05, I find the http negotiation is not right between them. Which cause the multiple http connections and in each http transaction mediatomb want to send all the data to DSM-320.

     
    • Jin
      Jin
      2005-05-07

      sorry I do not quite understand you. what exactly is the problem?

      can you please specify what exactly is wrong in the http negotiation or provide an ethereal capture?

      thx

       
      • jason
        jason
        2005-05-07

        DSM-320 use http 1.0, Intel UPnP libs use http 1.1, then DSM-320 will behave strangely with HTTP GET file, and it seems the Intel Libs does not support KEEP-ALIVE, so DSM-320 keep shooting Mediatomb when playing files.

        I do have ethereal capture of DSM-320 talk with both DSM-320 Media server and Mediatomb Media server.

        But I don't know how to send attachment file in sourceforge.com.

        Or you can capture the packet by yourself.

         
        • YuChung Wang
          YuChung Wang
          2005-05-24

          For the media server issue, DSM320 treat mediatomb as third party server so that it reject to use Keep alive feature. You must add

          User-Agent: redsonic

          into your headers of HTTP response so that DSM320 will use keep alive. If you don't want to setup User-Agent to be redsonic. You can use

          X-User-Agent:  redsonic

          instead. Actually, we don't reaaly care the name of the field at all. You just need redsonic in one of your headers.

           
          • Jin
            Jin
            2005-05-24

            thanks for the information!

            however the problem is that I proabbly can not set the headers without patching the UPnP SDK... at least now I know what the problem is, thanks!

            Kind regards,
            Jin

             
    • Jin
      Jin
      2005-05-07

      you can send a mail to jin_eld@users.sourceforge.net using your normal mail client, and attach the file.

      I can not make a capture myself now, because I do not own the DSM - I have to go to a place where I have access to it (only possible during the week)

      however.. as you pointed out: the HTTP stuff is implemented in the UPnP SDK... so there is not much we can do. For the distant future we plan to write our own UPnP stack, but I don't really want to mess around with the Intel SDK...

       
    • jason
      jason
      2005-05-25

      thanks all,
      I try that, and I also add keep-alive support in intel upnp lib, now play avi file is very smoth. I also fix another problem because DSM-320 send wrong object id, like "9.idx" to mediatomb and cause exceptions.

      Now get another issue:
      Fast-Forward works fine with avi file, but does not work with vob (dvd) file.
      Any idea?

       
      • lotso
        lotso
        2005-05-30

        Jason, If you could, can you either send me the patch or just post the patch here in this forum?

        I would really want to try it out since I have a DSM box and it's not playing the AVI file properly.

        I've looked at the src but I've yet to figure out where exactly to patch it.

        Thanks.

        nikeow_at_yahoo.com

         
    • dingding
      dingding
      2005-05-26

      The DSM-320 ask for the file like "9.idx" is not a bug. It ask for that index file when you want to Fast-Forward the mpeg file. So you need program to generate that index file for mpeg file, otherwise you will not get Fast-Forward to work. I think D-Link Media Server do have the program or source code to generate the index file either before playing or during playing the mpeg file.

       
    • dingding
      dingding
      2005-05-26

      I just find this little secret from D-Link Media Server Application's GUI. When you fast forward the movie, you will see 2 connections in Media Clients Transfer Status listbox contained in System tab. One of the connection is downloading the idx file.

      There will be more findings the more you use D-Link Media Server.

       
    • Jin
      Jin
      2005-05-26

      hmm... would be interesting to look at the browse result. I wonder if they advertise that idx file in the XML when you browse the actual video file. That would be the correct way to do it..

      but actually I wonder why this idx file is needed at all.. on the Streamium I can fast-forward mpeg and avi files without any additoinal idx files...

       
    • YuChung Wang
      YuChung Wang
      2005-05-29

      In order to support FF/FB, we need an index table which contains the pointer to each key frame. This index table exists in AVI, MOV and WMV. However, it does not exist in all types of MPEG files.

      Without the index table, we can still support FF. However, the FB is almost impossible or at least, is very difficult.

      In order to avoid confusion, DSM320 disable FF/FB for files without index.

      The index file istself is not published in UPnP since we don't want the user to "know" or "see" it.

       
      • Stefan Lucke
        Stefan Lucke
        2005-09-07

        Do you know the structure of that "9.idx" file ?
        Background is I want to FF/FR in my DVB recordings recorded by VDR. VDR itself has a separate file with an index of all I-frames.

         
    • jason
      jason
      2005-05-30

      Can you give me your email addess?

       
    • lotso
      lotso
      2005-05-30

      Jason,

      my email is nikeow@yahoo.com

      Thanks

       
    • jason
      jason
      2005-05-30

      libupnp-1.2.1a is sent.

       
    • Mind pasting the patch in here too so that the rest of us can apply it?

      Thanks.

       
    • Jin
      Jin
      2005-06-01

      indeed.. if you guys can confirm that the patch works with the DSM-320 - please send it to me and I will post it in our download section.

       
    • lotso
      lotso
      2005-06-04

      Thanks to Jason for libupnp.

      I just tried it and it doesn't seem like it works.

      Here's what I did, I compiled the upnpa which Jason sent, Changed the JOBS_PER_THREAD and recompiled everything incl mediatomb.. still no dice.

      I did however played a MPG file (finally found one which is big enough ~400MB) and played it with no hiccups at all.

      I did notice that the AVI file uses a lot of resources, Network Traffic is ~2Mb/s vs 300Kb/s when playing MPG streams.

      Also, another thing which I noticed in the output of mediatomb is when playing a MPG file, the output will only show at most 3-5 times the "playing file /path/to/file.mpg"

      But if I were to play an AVI, the output is almost continuous. (runnin as screen helps otherwise it will definately stutter)

      I've yet to try it out with the upnp from Intel. I honestly think it would be the same. Meaning, MPG works, AVI sucks.

      Also, quicktime/WMV doesn't work.

      I don't believe mediatomb-0.8 will fix this unless there's someone who can really figure out what's happening. (I don't, but I'm hoping Jason can)

      PS: Jin, Jason sent me the whole libupnp-1.2.1a and not a patch.

       
    • Jin
      Jin
      2005-06-04

      the AVI problem with the DSM320 is known, wycc described what needs to be done to fix it, however - it is not a bug in MediaTomb, it's a bug in the UPnP SDK.

      I have to say that I do not own a DSM-320, so I can not really debug a lot. I have access to a unit, but it's not nearby.

      Jason was saying that his modifications worked.. so I wonder why it failed for you.

      Regarding WMV/quicktime - those files are not being recognized by filemagic, so the mimetype is set incorrectly. 0.8.x will introduce another import option in the server configuration: extension to mimetype mapping, that will take care of this problem.

       
    • jason
      jason
      2005-06-04

      It is all the source code of my changed libupnp-1.2.1a, I am not sure why your compile failed. But I think it is very easy to hack it by yourself. Or you can get original libupnp-1.2.1a to compare.

      And it is ture I follow the wycc suggestion and it really works with DSM-320.

      And I am waiting for new Mediatomb release.

       
    • YuChung Wang
      YuChung Wang
      2005-06-06

      lotso,

      you may post your ethereal log. Just check if your HTTP request contains redsonic inside it or not. It looks like you miss the header so that the keepalive does not work at all.

       
    • lotso
      lotso
      2005-06-06

      Jason :

      My compile didn't fail. It just didn't work. I did do a comparison with the 1.2.1a sdk I got from sourceforge. (the upnp homepage lists 1.2.1 as the most recent release though) and there were basically some extra files as far as I can tell. If you would be so kind, can you do the diff and paste the patches here? it would most certainly help.

      I understan the wycc suggestion. That's whay I too tried to locate where I could patch it. Though it's obvious I didn't manage to locate it.

      wycc : Here's the logs
      AVI File :
      GET /content/media?object_id=243 HTTP/1.0

      Host: 192.168.1.28:49152

      Range: bytes=0-

      User-Agent: dma/1.0 redsonic

      HTTP/1.0 206 Partial Content

      CONTENT-LENGTH: 366068224

      CONTENT-TYPE: video/x-msvideo

      CONTENT-RANGE: bytes 0-366068223/366068224

      DATE: Sun, 29 May 2005 12:25:53 GMT

      LAST-MODIFIED: Sun, 29 May 2005 04:16:48 GMT

      SERVER: Linux/2.6.11.4-suspend2-Busgentooware, UPnP/1.0, Intel SDK for UPnP devices /1.2

      MPG File :
      GET /content/media?object_id=244 HTTP/1.0

      Host: 192.168.1.28:49152

      Range: bytes=0-

      User-Agent: dma/1.0 redsonic

      HTTP/1.0 206 Partial Content

      CONTENT-LENGTH: 458939588

      CONTENT-TYPE: video/mpeg

      CONTENT-RANGE: bytes 0-458939587/458939588

      DATE: Sun, 05 Jun 2005 08:09:32 GMT

      LAST-MODIFIED: Sat, 06 Nov 2004 16:22:46 GMT

      SERVER: Linux/2.6.11.4-suspend2-Busgentooware, UPnP/1.0, Intel SDK for UPnP devices /1.2

       
    • YuChung Wang
      YuChung Wang
      2005-06-06

      This is the first request which is used to detect the media server. Can you send the second and third request?

       
    • lotso
      lotso
      2005-06-07

      wycc,

         I'll see if I can find it. (I hope I saved the logs.)

      Else it'll take me some time before I can unpack everything and hook up eveything once again.

      thanks

       
1 2 > >> (Page 1 of 2)