使用 ASP.NET 播放大量 WMV 文件
我正在使用 c#.net 开发 ASP.NET,并且有很多 WMV 文件,必须注意我给出的文件的范围。文件的大小太大,用户也不应该下载所有文件,应该在我给出的范围之间下载。有人可以帮助我吗?
I am developing a ASP.NET by using c#.net and have many WMV files and have to watch the range of the file which I gave.The size of files are too big also the users shouldn't download the all of the file , should download between the range which I give . Is there anybody to help me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,由于 WMV 文件在开头有一个标头,在结尾有一个索引,因此您不能仅使用 FileStream 来传送部分文件,因为 MPEG1/2 或 H.264 等“流”格式要好得多。
对于部分 WMV 文件流,我将在
Microsoft Media Services
中进行调查这基本上可以为您完成这项工作,尽管如果您想严格控制要从中流式传输的偏移量,则必须为文件动态创建播放列表(即请参阅服务器端播放列表)
Unfortunately since WMV files have a header at the beginning and an index at the end you can't just use a FileStream to deliver partial files, for that "streaming" formats like MPEG1/2 or H.264 are much better.
For partial WMV file streaming I would investigate in
Microsoft Media Services
This will basically do the job for you, although if you want tight control over the offsets you want to stream from you will have to dynamically create playlists for your files (i.e. see Server side playlists)