title: Directshow Capture (h264 encode) and Preview
body: <p>I'm trying to develop a C# application for record and preview real time videos from a directshow device source (USB3HDCAP) with max resolution: 1920x1080.</p>
  
  <p>Video must be encoded to H264. </p>
  
  <p>I already tried to use C# computer vision frameworks like Aforge and Accord.FFMPEG. However it doesn't work because encoding is too slow, and then preview gets really delayed. </p>
  
  <p>Than, I tried to make a simple directshow graph with graph edit, using FFMPEG tryout encoder or vfw264, and I get the same result: Preview really slow, and image quality not so good.</p>
  
  <p>For the last I tried <a href="https://i.stack.imgur.com/UbJEN.png" rel="nofollow noreferrer">Leadtools Filter</a>. The result was perfect, no delay, and record quality pretty good. However Leadtools isn't free. </p>
  
  <p>Do you know a better solution? </p>