I want to use command line facility in android to use ffmpeg library.But i am getting IO Exception while trying that,I have stored ffmpeg.exe in /files folder.This is the 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);
}
}
}
This is the error :
09-16 16:24:38.751: I/System.out(2209): exceptionjava.io.IOException: Error running exec(). Commands: [/data/data/com.example.ffmpegnew] Working Directory: /data/data Environment: null
Please tell me what is the problem.Thanks in advance.