在Android上运行FFMPEG命令
下面是一段代码在Android上运行FFMPEG命令,android,Android,下面是一段代码 String[] ffmpegCommand = new String[5]; ffmpegCommand[0] = "/mnt/sdcard/com.ffmpeg_test/ffmpeg"; ffmpegCommand[1] = "-i"; ffmpegCommand[2] = "concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_
String[] ffmpegCommand = new String[5];
ffmpegCommand[0] = "/mnt/sdcard/com.ffmpeg_test/ffmpeg";
ffmpegCommand[1] = "-i";
ffmpegCommand[2] = "concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4";
ffmpegCommand[3] = "copy";
ffmpegCommand[4] = "/mnt/sdcard/com.ffmpeg_test/output.mp4";
try {
Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
String line;
BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
Log.d(null, "*******Starting FFMPEG");
while((line = reader.readLine())!=null){
Log.d(null, "***"+line+"***");
}
Log.d(null,"****ending FFMPEG****");
} catch (IOException e) {
e.printStackTrace();
}
我不知道如何理解可执行的ffmpeg命令。“/mnt/sdcard/com.ffmpeg_test/ffmpeg”;
ffmeg附带源代码并内置到共享库libffmpeg.so中,但ffmpeg可执行命令文件却没有。有什么想法吗?如果它是一个共享库,那么它就没有可执行性。如果你可以编译源代码,那么它应该是ARMcompatible@Axarydax为什么呢?