title: How to get direct show fillter?
body: <p>i am recording video from webcam using DirectshowLib2005.dll in C#.net..i have this code to startVideoRecoding as below..</p>
  
  <pre><code>try
          {
              IBaseFilter capFilter = null;
              IBaseFilter asfWriter = null;
              IFileSinkFilter pTmpSink = null;
              ICaptureGraphBuilder2 captureGraph = null;
              GetVideoDevice();
              if (availableVideoInputDevices.Count &gt; 0)
              {
                  //
                  //init capture graph
                  //
                  graphBuilder = (IFilterGraph2)new FilterGraph();
                  captureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2();
                  //
                  //sets filter object from graph
                  //
                  captureGraph.SetFiltergraph(graphBuilder);
                  //
                  //which device will use graph setting
                  //
                  graphBuilder.AddSourceFilterForMoniker(AvailableVideoInputDevices.First().Mon, null, AvailableVideoInputDevices.First().Name, out capFilter);
                  captureDeviceName = AvailableVideoInputDevices.First().Name;
                  //
                  //check saving path is exsist or not;if not then create
                  //
                  if (!Directory.Exists(ConstantHelper.RootDirectoryName + "\\Assets\\Video\\"))
                  {
                      Directory.CreateDirectory(ConstantHelper.RootDirectoryName + "\\Assets\\Video\\");
                  }
                  #region WMV                   
                  //
                  //sets output file name,and file type
                  //
                  captureGraph.SetOutputFileName(MediaSubType.Asf, ConstantHelper.RootDirectoryName + "\\Assets\\Video\\" + videoFilename + ".wmv", out asfWriter, out pTmpSink);                    
                  //
                  //configure which video setting is used by graph
                  //                
                  IConfigAsfWriter lConfig = asfWriter as IConfigAsfWriter;
                  Guid asfFilter = new Guid("8C45B4C7-4AEB-4f78-A5EC-88420B9DADEF");
                  lConfig.ConfigureFilterUsingProfileGuid(asfFilter);
                  #endregion
                  //
                  //render the stram to output file using graph setting
                  //
                  captureGraph.RenderStream(null, null, capFilter, null, asfWriter);
                  m_mediaCtrl = graphBuilder as IMediaControl;
                  m_mediaCtrl.Run();
                  isVideoRecordingStarted = true;
                  VideoStarted(m_mediaCtrl, null);
              }
              else
              {
                  isVideoRecordingStarted = false;
              }
          }
          catch (Exception Ex)
          {               
             ErrorLogging.WriteErrorLog(Ex);
          }
  </code></pre>
  
  <p>if you observe this lines of code</p>
  
  <pre><code>//
                  //configure which video setting is used by graph
                  //                
                  IConfigAsfWriter lConfig = asfWriter as IConfigAsfWriter;
                  Guid asfFilter = new Guid("8C45B4C7-4AEB-4f78-A5EC-88420B9DADEF");
                  lConfig.ConfigureFilterUsingProfileGuid(asfFilter);
  </code></pre>
  
  <p>it will apply video setting which is described on that GUID i got this GUID from file located at "C:\windows\WMSysPr9.prx"..</p>
  
  <p>so my question is how create my own video setting with format,resolutions and all?</p>
  
  <p>How to Record video using webcam in black and white mode or in grayscale?</p>