这是我的Android
命令代码try {
String cmd[] = new String[]{"-i", video_file, "-ss", "00:04:00", "-i", audio_file, "-c:v", "copy", "-af", "apad", "-shortest", image.getPath()};
ffmpeg.execute(cmd, new FFmpegExecuteResponseHandler() {
@Override
public void onSuccess(String message) {
Log.e(TAG, "onSuccess: " + message);
}
@Override
public void onProgress(String message) {
Log.e(TAG, "onProgress: "+message);
}
@Override
public void onFailure(String message) {
Log.e(TAG, "onFailure: " + message);
}
@Override
public void onStart() {
Log.e(TAG, "onStart: ");
}
@Override
public void onFinish() {
Log.e(TAG, "onFinish: ");
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
e.printStackTrace();
}
答案 0 :(得分:0)
您可以尝试放
-y
到ffmpeg命令行的开头。 因为ffmpeg不会覆盖现有文件或文件路径。 示例:
"-y -i..."