title: How to run ffmpeg from command line in android
body: <p>I want to use ffmpeg using command line.I have saved ffmpeg.so in files directory in the project.But i am getting exception while doing so.This is the code:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      Process p;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Process p = Runtime.getRuntime().exec("/data/data/com.example.ffmpegnew/files/ffmpeg",null, new File("/data/data/com.example.ffmpegnew/files"));
  
          }
          catch(Exception e)
          {
              System.out.println("exception"+e);
          }
  
      }
  
  }
  </code></pre>
  
  <p>This is the exception:</p>
  
  <pre><code>09-16 16:21:24.992: I/System.out(2103): exceptionjava.io.IOException: Error running exec(). Commands: [/data/data/com.example.ffmpegnew/files/ffmpeg] Working Directory: /data/data/com.example.ffmpegnew/files Environment: null
  </code></pre>
  
  <p>Please tell me what kind of mistake i am doing.Thanks.</p>