title: How do I actually use ffmpeg on Android?
body: <p>I have a very basic question regarding Android and ffmpeg. I obtained ffmpeg from <a href="http://bambuser.com/opensource" rel="nofollow">http://bambuser.com/opensource</a> and was able to compile it for ARM.</p>
  
  <p>The results are the binaries (<code>ffmpeg</code>) as well as several <code>libsomething.so</code> files.</p>
  
  <p>My question is: Is this enough to decode videos? How do I actually use ffmpeg then?</p>
  
  <p>To load the library I have:</p>
  
  <pre><code>static {
      System.load("/data/data/com.package/lib/libavcodec.so");
   }
  </code></pre>
  
  <p>It loads fine. But what then?</p>
  
  <p><sub>
  More explanation: I saw other projects where people had their ffmpeg source in a JNI directory in the project. They also created some Android.mk files and some C code along with it. Would I need this as well? Why would I create the .so files first and then copy the ffmpeg source code again?
  </sub></p>
  
  <p><sub>
  I know the NDK and how it should work but I've never seen an example of how one would actually call ffmpeg functions using it, because people seem to be hiding their implementations (which is sort of understandable) but not even giving useful pointers or examples.
  </sub></p>
  
  <p><sub>
  Let's just say I wanted to decode a video file. Which kind of native methods would I need to implement? How do I run the project? Which data types need to be passed? etc. There are certainly a few people here who have at least done that, I know this from searching for hours and hours.
  </sub></p>