Wellington

Hi all,

I've developed an Application in Visual Basic 6.0 to Play Videos, Capture Frames and Capture Videos using the DirectShow features together with other dll's like Capstill and Fsfwrap. Now, I need to capture videos in MPEG mode, because of the data size of the AVI files, but I don't know if it's possible. If not, can I at least compress the AVI file to a MPEG file using Visual Basic

If someone could help me I would be grateful.

Wellington.



Re: DirectShow Development Video Capture for Visual Basic.

LGS

Are you talking about capturing video from a device that outputs MPEG Or converting output to mpeg from a device that outputs something else

Is VB.Net an option

Also, there is something to be aware of about converting to mpeg video compression. MPEG is covered by a variety of patents, so there is no free implementation. What's more XP doesn't ship with it (although your computer manufacturer or some software package may have included something). So while you may have mpeg software on your computer, you can't count on it being on another computer. And of course there are a variety of implementations, each behaving differently from the others.





Re: DirectShow Development Video Capture for Visual Basic.

Wellington

1st.: I'm trying to capture a video file, in WDM, from a webcam or a tv card. I didn't know that there are differences between the devices.

2nd.: Yes, VB.Net is an option if there is no solution for VB6. Visual C and Visual C++ are possible options too (the last options).

3rd.: Well, so, can you teach me how to capture the video in another file format that will take a fewer size of bytes In my application, an AVI file is taking about 1GB in 95 seconds of video stream. Buying a development kit is a possible solution too, but wich one do you recommend

Thanks.

Wellington.






Re: DirectShow Development Video Capture for Visual Basic.

LGS

1) In an ideal world, these two operations would work (essentially) the same. However, because of licensing restrictions regarding MPEG, things can get a little messy.

2) I don't know that there aren't vb6 solutions, but if there are, I don't know what they are. For vb.net, you might check out http://DirectShowNet.SourceForge.Net. While most of the samples provided are c#, there are a few for vb.net, and the underlying DLL works just fine with both.

3) You are going to need to add a video compressor to your graph. If you look at DirectShowNet, check out the DxPropPages sample (among others). Note that this is a simple program that shows all installed codecs. Not all codecs will work with all input media types. You may have to fiddle a little to find one that works well for you.

---

Co-author DirectShowNet





Re: DirectShow Development Video Capture for Visual Basic.

Wellington Mendes

I'm back,

I'm trying to use the "C#.net" with "DirectShowLib V2.0" to solve my problems, but I'm having troubles again. Now I'm using a WMV Capture Sample to learn how to do use it. The sample was creating a very short dimensioned video, something like 176 x 132, and I was looking for how to resize it. This sample uses Guid's do configure the Writer Filter. I have looked for a bigger dimensioned configuration among the Profiles described on the "WMSysPr9.prx" but my search had no success.

Can anybody help me

Grateful,

Wellington Mendes.





Re: DirectShow Development Video Capture for Visual Basic.

LGS

From the CapWMV Readme:

This sample uses IConfigAsfWriter::ConfigureFilterUsingProfileGuid to configure the writer. This method is DEPRECATED by Microsoft. The reason they did this is that the number of configuration options grew too large, and creating a separate guid for all the permutations wasn't practical.

The new method is using IConfigAsfWriter::ConfigureFilterUsingProfile. However, that method requires IWMProfile, which in turn requires IWMStreamConfig, which requires... Rather than duplicate all the "WindowsMedia" interfaces in a "DirectShow" library, if you want to use the new approach, use the WindowsMediaLib.





Re: DirectShow Development Video Capture for Visual Basic.

Wellington Mendes

Do you have any campture sample to guide me I've tried to use the Microsoft Platform SDK, but, I don't know why, it's not working. When I run the sample it shows a lot of errors.

Grateful

Wellington Mendes





Re: DirectShow Development Video Capture for Visual Basic.

LGS

What do you mean "use the PSDK " The CapWMV sample isn't in the PSDK.





Re: DirectShow Development Video Capture for Visual Basic.

Wellington Mendes

Yes, I know..... I'm using now the AMCAP sample included on the PSDK, but, how I said, when I run it, it shows me a lot of errors. The most of this errors can be corrected when including some Header Files (".h") on the project. I've searched all the dependences of the project and some of them was in an old DirectX 9 SDK directory on my computer. I've included all of them, but some errors are still there. I don't know how to solve the remaining errors, because it points about no-declared constants, and I can't know their real values.

If you know any other sample, or a way to solve the errors on my SDK, please tell me.

Grateful,

Wellington Mendes.





Re: DirectShow Development Video Capture for Visual Basic.

Victor_PP

Wellington, could you please share the code of your VB6 program to capture frames using DirectShow. I have been searching on the web for such a code but found only some examples for VB.net and C++.

Thank you,

Victor