 |
|
 |
In Filter there is a nasty hack in getName(string monikerString)
Instead of getting a random moniker and parsing the moniker string into it, simply call MKParseDisplayName.
Declare these native methods...
[DllImport("Ole32.dll", EntryPoint = "MkParseDisplayName", CharSet = CharSet.Auto)]
static extern int MkParseDisplayName(
IBindCtx bc, string szUserName, out uint chEaten, out IMoniker mk
[DllImport("Ole32.dll", EntryPoint = "CreateBindCtx", CharSet = CharSet.Auto)]
private static extern int CreateBindCtx(int reserved, out IBindCtx bindContext);
Then create a bind context and call MKParseDisplayName
CreateBindCtx(0,out bindContext);
MkParseDisplayName(bindContext, monikerString, out eaten, out moniker);
You'll want to check the HRESULTS returned by these methods too.
|
|
|
|
 |
|
 |
Hi
Do you have any idea how to take pixels directly form capture
(I need it to build bitmap in second picturebox).
|
|
|
|
 |
|
 |
This project might help: FrameGrabber
But I don't think that works for live video, so check out the SampleGrabber filter on MSDN if that's what you need.
|
|
|
|
 |
|
 |
Is there any plans to update DirectX.Capture to the latest version of DirectShowNET v2.0, release Aug 2007?
|
|
|
|
 |
|
 |
Hello
Thx for the help in advance.
I have downloaded your project and while testing it, it throws an exception "Value does not fall within the expected range".
I am using Hauppage HVR 2250. the card works fine with WinTV....
Waiting for your response...
Regards
|
|
|
|
 |
|
 |
Hi,
I want to use IVideoProcAmp Interface of DirectShowLib
which is defined in Vidcap.cs file & all
the functions which is defined in it.
But I have no idea about how to use it.
Plz help me.
Thanks in Advance
|
|
|
|
 |
|
 |
Hi all
I m using Directx.Capture for video recording & image capturing.
During recording color of an object become dull & fade. I want
the original color of an object during recording. How can I do so? Is
there is any color setting option during recording?
Reference - http://www.codeproject.com/KB/directx/directxcapture.aspx
Thanks in Advance
|
|
|
|
 |
|
 |
hi!
i'm using your code in my sample and the program is running well but i want frames like 8-bit grayscale and the i'm receiving 24-bit RGB from the video stream.
so...after reading about DirectShow i'm wondering if using this Color Space Converter Filter could solve my problem. I guess so..could you please give me a hand about how to implement that or another solution??
thanks in advance,
Pedro Zamuner
|
|
|
|
 |
|
 |
hi
i am using vb.net 2005 and if i use this code to disable the preview it does not work
code:
previewwindow = nothing
also if i try this i just get an error
dim value
value = DBNull.Value
previewwindow = value
please help
|
|
|
|
 |
|
 |
Not sure offhand what's wrong here, but I would try a couple things:
Instead of setting PreviewWindow to Nothing, try setting Preview to false.
Or, set PreviewWindow to Nothing (definitely use Nothing, not DBNull.Value!), then manually force the control that was the PreviewWindow to refresh (call Control.Refresh() or Update() or Invalidate()...I forget which is best right now).
Also, the code you posted shows you setting a variable named previewwindow (or the above is just pseudocode, if so then nevermind). The code will have no effect until you actually set the property on the Capture object however.
|
|
|
|
 |
|
 |
I downloaded the source code from here but CaptureTest code seems still old since it saves the capture to AVI format not MPEG as shown in the demo.
|
|
|
|
 |
|
 |
Hi
great job man!
If I want to capture a HD video, what I have to do ?
Do you have any idea?
Thank you for helping me!
Maryam
|
|
|
|
 |
|
|
 |
|
 |
Hi!
I want to capture Audio and Video.
The Audiosource is a Microphone plugged in to my soundcard.
The Videosource is a webcam plugged in to USB.
When i choose to compress the Audio and Video with a compressor the result is a avi file which becomes asynchron by time.
Its getting worse the longer the video is.
The only way that there is no difference between audio and video is that i capture the video without any compression.
I want to record a very long video so it is very important for me to compress it.
Has anybody a solution for this problem?
Greetings
Webrat
|
|
|
|
 |
|
 |
I have the same problem. Video lags behind audio and the lag rapidly increases. By about 3 seconds it is very noticeable.
I am using a USB web cam as video input and a USB or onboard soundcard as audio. I have tried three different audio sources and two webcams. I have tried a variety of different video and audio encoders. All of this to no effect. The machine is a 2.6GHz core 2 duo with 2GB of ram running XP.
I suspect that the way the Capture library is configuring the graph is at fault but I'm not sure about that.
Regards,
Felix
|
|
|
|
 |
|
 |
Hello. I have a tv tuner card and i want to store snapshots from it.
I wonder how to do it.
Thanks.
|
|
|
|
 |
|
 |
Hi!
How i can capture the DV video stream with audio from a DV Firewire source the captured videofile contains no audio...
hope for your support
|
|
|
|
 |
|
 |
Hello,
there is a problem with the FormatType DVinfo in functions:
- protected object getStreamConfigSetting( IAMStreamConfig streamConfig, string fieldName)
- protected object setStreamConfigSetting( IAMStreamConfig streamConfig, string fieldName, object newValue)
there is a peace of code in witch you trie to retrive the nested structure depending on the formatType. The FormatType DVInfo was not in it therefore i add it and i use VideoInfoHeader2 structure. But with this structure i'm not able to retrive the right video informations like framesize. Do you know any other way to retrieve the video informations when the FormatType is DVInfo?
Thanks in advance.
DAA
|
|
|
|
 |
|
 |
what is the exception ?
help me thanks
HRESULT:0x80070005 (EACCESSDENIED)
System.InteropServices.Marshal.ThrowExceptionForHRInternal
System.UnauthorizedAccessException in “mscorlib.dll”
|
|
|
|
 |
|
 |
sorry,I am ajenior in c# and I am sorry missunderstood how can I use it in grabbing aframe and how can I add it in ur example
|
|
|
|
 |
|
 |
The MediaDet method is meant for file reading. In the DirectX.Capture example the SampleGrabber could be used, more or less demonstrated in DxSnap. I have a working solution however, this example cause a lot of problems with SampleGrabber. The graph is (de)rendered a number of times. If the SampleGrabber filter/data has not been released in time, problems arise. Also the example itselfs has some problems in loosing COM data related to video/audio source, property page.
Do you want to save just a specific frames or multiple frames?
|
|
|
|
 |
|
 |
Hi There,
I'd be very interested in having a look at your working solution, as I'm trying to implement DxSnap-like funtionality into this code, and struggling since I don't really know what I'm doing with either C# or directShow...
I'm not worried if your code is beta, or even alpha, I'd just be very grateful for anything to get me started...
What I'd like to be able to do is to display a frame to another picturebox from the preview stream on the click of a button on the form.
Cheers,
Chris
|
|
|
|
 |
|
 |
I am preparing a modified version of my coding example, with some extra's such as FM Radio support, improved audio/video source exception handling, improved property page exception handling, limited VMR9 support and some sample grabber functionality. In addition the code might be usable with DirectShowLib and DShowNET. There is a conflict between the VS2003 and 2005 version, so 2 versions will be needed so 4 versions needs to be tested. I noticed that Windows Vista cause some additional problems, at least by me. In Vista I would go for VS20005 and DirectShowLib. The DShowNET 2003 version can become available very soon. This will be a beta version because still some strange exceptions occur. Biggest problem for me is the black picture (no video rendering) when starting preview. For that reason I added VMR9 ... usually it cause less problems.
I am doubting if this should become a new article. Some functionality such as SampleGrabber is more or less already publiced. I made the samplegrabber code a little more robust because using it, makes the DirectX.Capture example very unstable. At least with the "working" examples I saw till now. Maybe it is worth a new article, I do not know what the codeproject thinks. I publiced three articles before. At this moment I want to add the new code to my IksPropertySet article. But in fact the improved and extended example does not fit in there also.
On the to do list: PAL and 16:9 support.
|
|
|
|
 |
|
 |
I found a temporary solution for the black preview window. I added a de-interlace filter I used for testing (the Alpary Deinterlace Filter) in anotheer test program which did not shoed this problem. This solution is not needed for my Pinnacle capture device. The Hauppauge TV card seems to need some extra handling. I did not try other de-interlace filters.
|
|
|
|
 |
|
 |
The new code example will have a button that put the current frame in a picturebox. I am doubting what to do. Currently I use a small PictureBox because that is easier for me to handle. Maybe other people prefer a bigger PictureBox.
I started to update my articles, audiosav and videosav version are almost ready to be re-released. The IksProperty one will get the real SampleGrabber information. There is small chance SampleGrabber becomes a new article. Depends on the size of the new text. Even for a beta version there were some more or less nasty problems that needed to be solved first. I want to update the article first else I have to explain the code more than once. The SampleGrabber subject have been discussed several times, but still there are a lot of pitfalls. Some I solved such as releasing the filter if needed. Some I did not solve yet. The current code supports RGB24 only. Maybe in future I will make it more general. The interaction with the VP pin I am still working on, might be not that interesting for most of the readers. I assume that video file saving might cause conflicts with SampleGrabber when used at the same time. I did not spend time on that. SampleGrabber seems to work with the de-interlace solution I used, but no garantuee this will work for all filters. I did not do testing on that. Currently SampleGrabber fails with my Pinnacle USB PCTV when using the video renderer, with VMR9 it works ok.
|
|
|
|
 |