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?
Asked
Active
Viewed 2,572 times
1 Answers
2
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.

VitalyVal
- 1,320
- 12
- 13
-
I didn't realize that the ASX file was an XML playlist that referred to a video stream rather than just a video stream. The underlying video is WMF as VitalyVal said. This isn't so hard to import using ffmpeg. – JnBrymn Apr 03 '11 at 04:11
-
I do not know, how ffmpeg handle ASF streams with various audio and video formats. But it seems you can face with problems for some audio and video formats (like WMA voice codec, WMA 9 Professional, WMV 9,...). If you develop a Windows application, I think using WMF SDK is a better choice. – VitalyVal Apr 03 '11 at 08:59