title: Using Directshow C# How top get live feed from multiple USB cameras in multiple windows without crashing
body: <p>I am working on a project in C# using Directshow which mainly focuses on image processing  and printing in real time. I have written a code for capturing the images and displaying them in a output window . The code works fine with 4 cameras simultaneously.But the moment I add 5th camera the live feed from the 1st 4 cameras starts to glitch.And when I add 6th Camera the video from all the cameras stops .For my project I need to work with 16 cameras and none of them should have low performance.</p>
  
  <p>I have tried to optimize the graph by making all the graphs at once and then using them for their respective cameras but even then the issue isn't resolved.</p>
  
  <p>I am using <a href="https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/Win7Samples/multimedia/directshow/capture" rel="nofollow noreferrer">this</a> project as reference.</p>
  
  <p>the Live cameras feeds should not glitch since there is more than enough memory and CPU for it to function.</p>