开发者

How to capture ASX streaming video data

Given an ASX video feed (here for example - might take some time to load). How do capture the stream so that I can access the frames programma开发者_JAVA百科tically?


You can use the following schema (code examples are in suppose, that you need to implement your task on Windows and use MFC, but the same schema can be used for other conditions):

1) Get ASX file (for example using CHttpConnection, CHttpFile, etc.). For your example ASX file is:

[Reference]
Ref1=http://149.136.20.28/d3-Exposition-51?MSWMExt=.asf
Ref2=http://149.136.20.28:80/d3-Exposition-51?MSWMExt=.asf

2) Parse the ASX file. Generally an ASX file is a XML file. But sometimes real ASX files are not actually valid XML files (and this is true for your example). So you probably will need to process such cases. After parsing the ASX you will get a set of URLs. The URLs usually are alternatives of the same transmission.

3) Use Windows Media Format SDK (WMF SDK) to read streams represented by URLs. See Reading ASF Data Over a Network.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜