I use DirectShowLib and SampleGrabber to capture video frames of an AVI file. I accomplish this using a graph builder and a couple of filters. Everything worked fine, I was able to initialize the graph and filters.
Then I added the code to get some video information such as Dimension, Frame rate etc. For this I used IMediaDet. But when I try to initialize it:
Type t = Type.GetTypeFromCLSID(new Guid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")); IMediaDet mediaDet = (IMediaDet)Activator.CreateInstance(t);
Activator.CreateInstance(t) throws an exception:
Fetching a factory COM class for a component with CLSID {65BD0710-24D2-4FF7-9324-ED2E5D3ABAFA} failed due to the following error: 80040154.
I do not think that his problem is with the assembly, since the filters and graph builder are initialized perfectly. Anyone have any idea, or is there any other API that I can use to collect AVI file data such as sizes, frame rate, video length?
source share