Skip to content

Instantly share code, notes, and snippets.

@mancdevcarl
Created May 28, 2013 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mancdevcarl/5663633 to your computer and use it in GitHub Desktop.
Save mancdevcarl/5663633 to your computer and use it in GitHub Desktop.
getRuntimeExec()
StringBuffer outputx = null;
try {
Process processx = Runtime.getRuntime().exec("/data/data/com.example.ffmpegencode/ffmpeg -loop_input -i /sdcard/go.jpg -i /sdcard/gohoubi.m4a -shortest -acodec copy /sdcard/goood.mp4");
BufferedReader in = new BufferedReader(new InputStreamReader(processx.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
Log.d("", "line");
}
Log.d("", "encoding...");
processx.waitFor();
Log.d("", "finished encoding!");
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment