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.
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?
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.
For the media server issue, DSM320 treat mediatomb as third party server so that it reject to use Keep alive feature. You must add
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
instead. Actually, we don't reaaly care the name of the field at all. You just need redsonic in one of your headers.
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!
you can send a mail to email@example.com 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...
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.
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.
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.
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.
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...
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.
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.
Can you give me your email addess?
my email is firstname.lastname@example.org
libupnp-1.2.1a is sent.
Mind pasting the patch in here too so that the rest of us can apply it?
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.
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.
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.
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.
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.
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
User-Agent: dma/1.0 redsonic
HTTP/1.0 206 Partial Content
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/22.214.171.124-suspend2-Busgentooware, UPnP/1.0, Intel SDK for UPnP devices /1.2
MPG File :
GET /content/media?object_id=244 HTTP/1.0
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
This is the first request which is used to detect the media server. Can you send the second and third request?
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.