Click here to Skip to main content
13,507,541 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

I've been studying UPnP/DLNA media servers and have written my own media server from the ground up

My reasons for this is speed, my server has over 50,000 files on it and all commercial upnp applications use internal databases that are quite frankly "slow" so mine uses Microsoft SQL server for its database storage

As a comparison, When doing a search, tvMobili takes 9 seconds to return 1000 results, mine takes less than a second and overall works a lot faster with media players

So far Audio is working perfectly and streams very nicely, but im having problems with video, avi's just refuse to stream and players try to download the entire file before playing anything

I've read on a few forums that there are issues when streaming avi files, i must admit i should know more than i currently do (partly why i'm here)

But before anybody tells me that it "cant" be done, please take this into account tvMobili CAN do it, i just want to know how....

One thing i've noticed is that Windows media player makes 2 requests when starting a file (audio or video)

The first request is for the file eg. /stream/12345.mp3
The second request is a little different eg. /stream/12345.smi

I think the .smi extension holds the key, internet searches tell me its a subtitle file, but i think UPnP servers use it differently

Has anyone heard of this extension or is able to give me any clues to its format?

Here are the the 2 sets of headers that media player sends when opening an mp3 file

GET /stream/27776.mp3 HTTP/1.1
GetContentFeatures.DLNA.ORG: 1
Cache-Control: no-cache
Connection: Keep-Alive
Accept: */*
User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514

GET /stream/27776.smi HTTP/1.1
Connection: Keep-Alive
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Windows-Media-Player/12.0.7601.17514

Can anyone shed any light?

Thanks in advance

Posted 18-Nov-12 13:35pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

WMP is trying to load a subtitle file, you should answer the request with a content-type smi/caption or something like that and obviously attach the smi on the response body. Samsung TV's uses a different approach with srt files sending to the server a HEAD request with a header getCaptionInfo.sec:. For further information about SMI files take a look at[]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi thanks for the reply, id forgotten all about this thread

I did eventually find the answer and its down to the accept-range header
I believe that in avi the codec info is stored in the last frame,
So instead of having to download the entire file, it can just grab the last frame and get the info it needs to stream the file


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180417.1 | Last Updated 13 Apr 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100