Quick DirectShow question

  • Thread starter Thread starter Andrew Bullock
  • Start date Start date
A

Andrew Bullock

Hi,

I'm trying to use direct show to grab arbitrary frames from a DV .avi.

I'm using the PlayWnd code from this example:
http://www.codeproject.com/cs/media/directshownet.asp

Currently an IGraphBuiler is cast to an IVideoWindow, which is passed
the Handle of a picturebox to display the video in.

How can I grab the video directly into a bitmap object?


Thanks

Andrew
 
Andrew,

I don't like this example, personally. I think you would be better
using the ISampleGrabber interface and hooking into the video stream. For
AVI files, these samples ^should^ be in Bitmap format.

There is a library called DirectShow.NET, which has a good number of the
interfaces for DirectShow defined in a .NET assembly. You can use these to
access the render graph and insert your filter.

Here is a link to a good example of how to do this:

http://www.a2ii.com/tech/directx/tutorialDS6.htm

Hope this helps.
 
Nicholas said:
Andrew,

I don't like this example, personally. I think you would be better
using the ISampleGrabber interface and hooking into the video stream. For
AVI files, these samples ^should^ be in Bitmap format.

There is a library called DirectShow.NET, which has a good number of the
interfaces for DirectShow defined in a .NET assembly. You can use these to
access the render graph and insert your filter.

Here is a link to a good example of how to do this:

http://www.a2ii.com/tech/directx/tutorialDS6.htm

Hope this helps.


Hi,

I need to be able to move through the video frame by frame.
IMediaPosition only lets me do it by time, which isnt accurate enough as
i'm only provided with an average frame time by the IBasicVideo :(

Isn't there a (efficient/quick) way to do what i'm trying to do?

Andrew
 
Back
Top