title: Recording using AForge's VideoFileWriter
body: <p>I am having trouble recording a video from my webcam. I tried implementing the VideoFileWriter but keep getting the error "The specified module could not be found. (Exception from HRESULT: 0x8007007E)". Whenever i comment out the video writer everything works great but when attempting to record it to the hards drive using the writer the I get the error.
  I hope that this is a easy problem to solve. Below is the code i have.</p>
  
  <pre><code>private FilterInfoCollection VideoCaptureDevices;
          private VideoCaptureDevice FinalVideoSource;
          Bitmap image;
          private VideoFileWriter writer;
  
          void VideoShow()
          {
              VideoCaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
              FinalVideoSource = new VideoCaptureDevice(VideoCaptureDevices[0].MonikerString);
              FinalVideoSource.NewFrame += new NewFrameEventHandler(FinalVideoSource_NewFrame);
              FinalVideoSource.DesiredFrameRate = 15;
              FinalVideoSource.DesiredFrameSize = new Size(1280, 800);
              FinalVideoSource.Start();
          }
  
          void FinalVideoSource_NewFrame(object sender, NewFrameEventArgs eventArgs)
          {
              image = (Bitmap)eventArgs.Frame.Clone();
              pictureBox1.Image = image;
              writer.WriteVideoFrame(image);
          }
  
          public AForgeRecorder()
          {
              InitializeComponent();
          }
  
          private void btnStart_Click(object sender, EventArgs e)
          {
              writer = new VideoFileWriter();
              VideoShow();
              writer.Open(@"C:\testvvid.avi", 1280, 800, 15, VideoCodec.MPEG2, 128);
          }
  
          private void btnStop_Click(object sender, EventArgs e)
          {
              if (writer != null)
              {
                  writer.Close();
              }
          }
  </code></pre>
  
  <p>Thanks in advance</p>