下载期间播放 [英] Play during download

查看:54
本文介绍了下载期间播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人会评论这个设计吗? (抱歉,英文不好)

Can someone comment this design? (Sorry, bad English)

客户希望在HTTP下载期间播放视频。我尝试实现承载Microsoft ActiveX Media Control的

HTTP服务器和可执行文件。当$
下载开始(控制客户端代码)时,我启动服务器并使用命令行点生成可执行文件

到此服务器( HTTP://本地主机:端口/文件名)。它可以按预期用于WMV和ASF文件。对于MPG,它在下载后显示了
视频(我多次获得GET请求(其中一些是没有范围和条件的
))。 AVI仅在我清除浏览时才有效。
历史记录。我尽力尝试(除了GetContentFeatures.DLNA.ORG:1 - 不知道b
如何),处理HTTP标题中的任何条件和RANGE细节,但没有运气。

当我将请求与我的本地服务器与IIS(使用wireshark)进行比较时,即使在第一次GET中我也看到了
的差异。

Customer wants play video during HTTP download. I tried implementing
HTTP server and executable that host Microsoft ActiveX Media Control. When
downloading start (control client code) I start server and spawn executable with command line point
to this server (http://localhost:port/filename). It works as expected for WMV and ASF files. For MPG it show
video after downloading (and I get GET request several times (some of them
without range and conditions)). AVI it works only when I clear browsing
history. I tried, as I can (except GetContentFeatures.DLNA.ORG: 1 – don’t know
how), process any conditional and RANGE specifics in HTTP header but no luck.
When I compare request to my local server with IIS (using wireshark) I see
difference even in first GET.

我的问题是 - 如果这个模式可以适用于所有格式或者b $ b这只是个坏主意吗?

My question is – if this schema can work for all formats or
it just bad idea?

感谢您的时间。

推荐答案

假设您的HTTPd没有损坏,这总是有效,但不同的文件格式表现不同。

Assuming your HTTPd is not broken, this always works, however different file formats behave differently.

- ASF / WMV / WMA(所有相同的ASF格式)可以在没有文件索引的情况下播放,并由WM源过滤器播放,这些过滤器需要索引并且有自己的HTTP客户端优化用于流式传输。

- ASF/WMV/WMA (which is all the same ASF format) can be played without the file index and is played by the WM source filters, which do require the index and have their own HTTP client optimized for streaming.

- AVI可以在没有文件索引的情况下播放,但它由URLReader和AVISplitter播放。 AVISplitter需要索引,索引就在最后。 URLReader使用使用WinINet / WinHTTP HTTP客户端的HTTP名字对象。 HTTP客户端
支持范围请求,但HTTP名字对象不支持,因此URLReader必须在AVISplitter播放之前下载整个文件。

- AVI could be played without the file index but it is played by the URLReader and AVISplitter. The AVISplitter requires the index and the index is at the end. The URLReader uses the HTTP moniker which uses the WinINet/WinHTTP HTTP client. The HTTP client supports range requests, but the HTTP moniker does not, so the URLReader must download the whole file before the AVISplitter plays it.

- MPG / MPA / MP2 / MP3根本没有索引,它由URLReader和MPEG1Splitter播放。由于没有索引,文件文件在下载时仍在播放。

- MPG/MPA/MP2/MP3 does not have an index at all and it is played by the URLReader and MPEG1Splitter. Since there is no index, the file file is played while it is still being downloaded.

- MP4 / MOV / F4V / 3GP(相同的ISOM格式)需要索引,但索引可以放在开头或结尾:如果是在开头,可以立即播放文件;如果在最后,仅在完成下载后。

- MP4/MOV/F4V/3GP (same ISOM format) require the index, but the index can be placed at the beginning or at the end: if it's at the beginning, the file can be played right away; if at the end, only after a complete dowmload.

其他格式有其他行为,其他行为也是如此(以上描述适用于DirectShow)。

Other formats have other behaviors and so do other media players (the above description is for DirectShow).


这篇关于下载期间播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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