title: JavaCV capture a frame using FFmpeg
body: <p>I create a class that capture frame from a video. When it capture a frame, it's saved as a picture. When the video is .avi, application works ok. When format is .avi.</p>
  
   <pre class="lang-java prettyprint-override"><code>public static void main(String[] args) {
  
       FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("C:/Users/Ioanna/Desktop/video1.avi");
  
       try {
           IplImage img; 
  
           //Start grabber to capture video
           grabber.start(); 
  
           //grab video frame to IplImage
           img = grabber.grab();
  
           if (img != null) {         
               //save video frame as a picture
               cvSaveImage("capture.jpg", img);
           }
  
       }catch (Exception e) {      
       }
  }
  </code></pre>
  
  <p>The error is </p>
  
  <pre><code>Exception in thread "main" java.lang.ExceptionInInitializerError
      at com.googlecode.javacv.FFmpegFrameGrabber.&lt;init&gt;(FFmpegFrameGrabber.java:106)
      at Video.main(Video.java:75)
  Caused by: java.lang.IllegalStateException: Can't overwrite cause with java.lang.UnsatisfiedLinkError: no avcodec in java.library.path
      at java.lang.Throwable.initCause(Throwable.java:457)
      at com.googlecode.javacpp.Loader.load(Loader.java:581)
      at com.googlecode.javacpp.Loader.load(Loader.java:532)
      at com.googlecode.javacv.cpp.avcodec.&lt;clinit&gt;(avcodec.java:39)
      ... 2 more
  Caused by: java.lang.UnsatisfiedLinkError: no jniavcodec in java.library.path
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1837)
  </code></pre>
  
  <p>Do anyone know what is the problem?</p>
  
  <p>Thanks in advance</p>