

OutPin = GetPin(PinDirection.Output, "Preview", smartTeeFilter) Graph.AddFilter(videoRendererFilter, "Video Renderer") VideoRendererFilter = (IBaseFilter)new VideoRenderer() Create video renderer filter, add it to graph, connect smartTee Preview pin to video renderer's input pin IPin inPin = GetPin(PinDirection.Input, smartTeeFilter) IPin outPin = GetPin(PinDirection.Output, "Video", elgatoFilter) Graph.AddFilter(smartTeeFilter, "Smart Tee") SmartTeeFilter = (IBaseFilter)new SmartTee() Create smart tee filter, add to graph, connect Elgato's video out to smart tee in Graph.AddFilter(elgatoFilter, "Elgato Video Capture Filter") Type comType = Type.GetTypeFromCLSID(elgatoGuid) ĮlgatoFilter = (IBaseFilter)Activator.CreateInstance(comType) Graph = (IFilterGraph2)new FilterGraph() ĬaptureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2() Initialize filter graph and capture graph Set the video size to use for capture and recording using DirectShowLib ĭsROTEntry rot //Used for remotely connecting to graph Here is an example of creating a simple graph and previewing the Elgato's video stream. I know this is an old question, but in case anyone else stumbles across it it is quite easy to use the video stream from an Elgato capture card in C# with DirectShow.
