How to capture ASX streaming video data

2.5k views Asked by At

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 programmatically?

1

There are 1 answers

2
VitalyVal On BEST ANSWER

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.