473,396 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Quick DirectShow question

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
Feb 6 '06 #1
2 2305
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 Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:j7******************@newsfe6-win.ntli.net...
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

Feb 6 '06 #2
Nicholas Paldino [.NET/C# MVP] wrote:
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
Feb 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tamir Khason | last post by:
Question: I have some custom video card with custom driver, which does not support DirectShow. How it possible (if it is) implement program using it within .NET enviroment? TNX -- Tamir...
0
by: Nick Z. | last post by:
I need to use DirectShow and it is just a pain in the butt with C#. (since the managed version of dx doesnt have directshow) I'm thinking of different ways of getting DirectShow functionality. I...
7
by: Dave | last post by:
Hi, can I use directshow in c#??? dose Microsoft still support direct show sdk or there is a new technology today??? what is the best way to draw on playing video and how can I do that??? ...
1
by: rreno | last post by:
Hi Everyone, how are you today... hope you're all fine... i have my question hope somebody can answer my question..... i am using VC++ 2005 and I have started programming using directshow...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.