directshow.net

Changing sampled video size

♀尐吖头ヾ 提交于 2020-01-04 15:28:04
问题 I am capturing a video using DirectShow Library (.NET), I have an analog device that outputs video through BNC, I connected it to a FrameGrabber hardware (http://www.videohome.com.tw/eng/products-detail.php?p_id=72&level1_id=18) connecting through USB to my computer, I was told that the analog device outputs the video at 720x576, however I get the video at 640x480, at the site it says the FrameGrabber does support 720x576. For the purpose of simplicity, I tried to do what's described next in

How to draw on an unfilled box on a video stream using the mouse

纵然是瞬间 提交于 2020-01-04 09:10:24
问题 I am using dshownet(first time) and C#. I have got a sample to take the web cam input and display it on a form. I now need to draw a rectangle on top of the video stream using the mouse. (the intent is to track what is inside the box from there onwards). I heard that there is something called VMR. So I went to the dshownet samples and went through them. I didnt find any samples that use the mouse to overlay a shape on the video stream. Someone on here suggested to use colorkey. Another person

Audio Sync problems using DirectShow.NET

99封情书 提交于 2020-01-01 14:25:35
问题 I have started a thread on this at DirectShow.NET's forum, here is the link http://sourceforge.net/projects/directshownet/forums/forum/460697/topic/5194414/index/page/1 but unfortunately the problem still persists... I have an application that captures video from a webcam and audio from the microphone and save it to a file, for some reason the audio and video are never in-sync, i tried the following: 1. Started with ffdshow encoder and changed to AVI Mux - problem persists, audio is delayed

Text overlay when video is recording using Directshow and C#

删除回忆录丶 提交于 2019-12-31 06:51:07
问题 By using DirectShowLib i can able to record the video by using ASF writter here is the code to start recording try { IBaseFilter capFilter = null; IBaseFilter asfWriter = null; IFileSinkFilter pTmpSink = null; ICaptureGraphBuilder2 captureGraph = null; GetVideoDevice(); if (availableVideoInputDevices.Count > 0) { // //init capture graph // graphBuilder = (IFilterGraph2)new FilterGraph(); captureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2(); // //sets filter object from graph //

Get bitmap info from MPEG-2 Program / Transport Stream?

£可爱£侵袭症+ 提交于 2019-12-30 11:33:47
问题 In order to render a DirectShow graph in my WPF application, I use a sample grabber to write a bitmap to memory, and read it elsewhere in code. This may seem as a wierd solution, but seems to be the only way to get a WPF brush out of it. The following code gives me the information I need about the bitmap: AMMediaType mt = grabber.GetConnectedMediaType(); VideoInfoHeader header = (VideoInfoHeader)Marshal.PtrToStructure(mt.formatPtr, typeof VideoInfoHeader); header.BmiHeader // ... Now, header

Set properties of filter in DirectShow.NET

那年仲夏 提交于 2019-12-25 07:20:22
问题 How can I set properties of a DirectShow filter in c#? For example I want to set resolution of a webcam or the clippings of a cropping filter. 回答1: Filters typically have their "private interfaces", custom filter specific interfaces to control the filter in specific way, such as to set it up and/or alter its runtime behavior. There is no universal interface because filters are different. You normally know in advance what filter you are dealing with, so you QueryInterface its interface of

How to use EZrgb24 filter

对着背影说爱祢 提交于 2019-12-25 03:59:27
问题 Context I'm trying to apply filter such as contrast, color change, brightness on every frame of a .avi video. The video is playing just fine with directshow.net and c#. after a couple hours of research, I found out that buffercb was not the way to go to do the job. Apparantly, EZrgb24 is a filter I can add to my graph that does exactly what I want. However, I can't get it to work. Added in the beggining of my class [DllImport("ole32.dll", EntryPoint = "CoCreateInstance", CallingConvention =

How to connect EZrgb24 filter to my graph

谁都会走 提交于 2019-12-25 02:39:06
问题 Context I successfully loaded a 32 bit ezrgb24 COM (compiled it from the samples) The video is playing just fine with directshow.net and c#. However, I dont know how to connect the ezrgb24 filter I created to my graph. Added in the beggining of my class [ComImport, System.Security.SuppressUnmanagedCodeSecurity, Guid("fd5010a3-8ebe-11ce-8183-00aa00577da1"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IIPEffect { [PreserveSig] void get_IPEffect([Out] out int effectNum,

BufferCB not being called by SampleGrabber

我是研究僧i 提交于 2019-12-25 02:21:34
问题 I'm using a SampleGrabber to get audio data, however my BufferCB method is not being executed. What am I doing wrong ? //add Sample Grabber IBaseFilter pSampleGrabber = (IBaseFilter)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID_SampleGrabber)); hr = pGraph.AddFilter(pSampleGrabber, "SampleGrabber"); checkHR(hr, "Can't add Sample Grabber"); AMMediaType pSampleGrabber_pmt = new AMMediaType(); //pSampleGrabber_pmt.majorType = MediaType.Audio; pSampleGrabber_pmt.subType = MediaSubType.PCM;

Directshow.net don't detect all mics in Windows 7

核能气质少年 提交于 2019-12-24 16:42:56
问题 I'm having problems with the Directshow.net library and Windows 7. In some PC (only if in Device Manager > Controllers Sound, video, listed: "High Definition Audio Device") only detect 1 mic when Skype, MSN, and Recording Devices, lists at least two; when executes this code: Filter audioDevice = null; if (capture != null) audioDevice = capture.AudioDevice; "audioDevice" only have the first mic (internal mic or rear mic), and don't retrieve de second mic (front mic -jack-) or vice versa.