title: How to create mp4 video using Aforge.Net AviWriter
body: <p>I'm using Aforge.net library to capture video from Webcam and create .avi files using XVID.</p>
  
  <p>Code snippet that I'm using (this is not the full code) -</p>
  
  <pre><code>writer = new AVIWriter("XVID");
  
  public void StartCapture()
  {
              videoSource.Start();
              writer.FrameRate = 30;
              writer.Open(videoFilename, frameWidth, frameHeight);
  }
  
  public void video_NewFrame(object sender, NewFrameEventArgs eventArgs)
  {
              writer.AddFrame((Bitmap)eventArgs.Frame);
  }
  
  public void EndCapture()
  {
              if (!(videoSource == null))
              {
                  if (videoSource.IsRunning)
                  {
                      videoSource.SignalToStop();
                      videoSource = null;
                      writer.Close();
                  }
              }
  
  }
  </code></pre>
  
  <p>My next requirement is to show this video in a embedded player on browser.
  After googl-ing I found that only DivX web player can play avi files from browser. However I would like to use HTML5 video tag to play the video so that my video plays in all browsers and I don't have to install separate plugins for each IE, Firefox, Safari etc.</p>
  
  <p>It would be great help if someone can give pointers on how to create mp4 video file using Aforge.net or any windows commandline tool that would convert my avi file into mp4.</p>