在Upnp什么是.smi文件? [英] In Upnp What is a .smi file?

查看:129
本文介绍了在Upnp什么是.smi文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我一直在研究UPnP / DLNA媒体服务器并从头开始编写我自己的媒体服务器



我的原因是速度,我的服务器上有超过50,000个文件,所有商业upnp应用程序都使用内部数据库,这些数据库非常慢,因此我使用Microsoft SQL服务器进行数据库存储



作为比较,在进行搜索时,tvMobili需要9秒才能返回1000个结果,我的花费不到一秒钟,整体工作速度更快,媒体播放器



到目前为止,音频工作得很完美,流媒体非常好,但是我遇到视频问题,avi'只是拒绝播放,播放器尝试下载整个文件之前玩任何东西



我在几个论坛上看到流式传输avi文件时出现问题,我必须承认我应该知道的比现在更多(部分原因)我在这里)



但之前任何人告诉我它不能完成,请考虑到这一点tvMobili可以做到这一点,我只是想知道如何....



我有一件事已经注意到Windows媒体播放器在启动文件(音频或视频)时发出2个请求



第一个请求是文件,例如。 /stream/12345.mp3

第二个请求有点不同,例如。 /stream/12345.smi



我认为.smi扩展程序保留了密钥,互联网搜索告诉我它的字幕文件,但我认为UPnP服务器使用它不同



有没有人听说过这个扩展程序或能给我任何格式的线索?



这里是打开mp3文件时媒体播放器发送的2套标题



GET /stream/27776.mp3 HTTP / 1.1

GetContentFeatures.DLNA.ORG:1

缓存控制:无缓存

连接:Keep-Alive

Pragma:getIfoFileURI.dlna.org

接受:* / *

主持人:10.20.0.1:4447

用户代理:NSPlayer / 12.00.7601.17514 WMFSDK / 12.00.7601.17514





GET /stream/27776.smi HTTP / 1.1

连接:Keep-Alive

接受:* / *

接受编码:gzip,deflate

主持人:10.20.0.1:4447

用户 - 代理人:Windows-Media-Player / 12.0.7601.17514





任何人都可以放光吗?



提前致谢



Chris

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
Pragma: getIfoFileURI.dlna.org
Accept: */*
Host: 10.20.0.1:4447
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
Host: 10.20.0.1:4447
User-Agent: Windows-Media-Player/12.0.7601.17514


Can anyone shed any light?

Thanks in advance

Chris

推荐答案

WMP正在尝试加载字幕文件,您应该使用内容类型smi /标题或类似内容来回答请求,并且明显将smi附加到反应机构。三星电视使用不同的方法,使用srt文件向服务器发送头部getCaptionInfo.sec:的HEAD请求。有关SMI文件的更多信息,请查看 http://msdn.microsoft.com/en-us/ library / ms971327.aspx [ ]
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 http://msdn.microsoft.com/en-us/library/ms971327.aspx[]


嗨谢谢你的回复,id忘记了关于这个帖子的所有内容



我最终找到答案及其失败接受范围标题

我相信在avi中编解码信息存储在最后一帧中,

所以不必下载整个文件,它可以只是抓住最后一帧并获取流媒体所需的信息



Chris
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

Chris


这篇关于在Upnp什么是.smi文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆