IntPtr fetched = Marshal.AllocCoTaskMem(4) Private IPin GetPin(PinDirection pinDir, IBaseFilter filter) Vw.put_WindowStyle(WindowStyle.Child | WindowStyle.ClipSiblings | WindowStyle.ClipChildren) Set the video preview to be the videoFeed panel InPin = GetPin(PinDirection.Input, videoRendererFilter) ĬaptureGraph.RenderStream(PinCategory.Preview, MediaType.Video, videoRendererFilter, null, null) 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) This capture card has a USB 3.0 type C connection with built-in live commentary and streaming feature on great platforms like Twitch and YouTube.
Improve elgato game capture hd software streaming 1080p#
Graph = (IFilterGraph2)new FilterGraph() ĬaptureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2() So, here is Elgato Game Capture HD60 S the first capture card in the list with the ability to record 1080p quality with 60 fps. 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.