I ran into the same problem, and my problem was this: I did not call the execute method correctly. The string array I passed was something like this:
final String[] cmd = new String[] { "-i input.mp4 strict -2 -i overlay.jpg -filter_complex [0:v][1:v] overlay=25:25:enable='between(t,0,4)' output.mp4" };
The correct way to create this array is to split the command into separate lines:
final String[] cmd = new String[]{ "-i", "input.mp4", "strict", "-2", "-i", "overlay.jpg", "-filter_complex", "[0:v][1:v]", "overlay=25:25:enable='between(t,0,4)'", "output.mp4"};
And then call execute:
try { final FFmpeg ffmpeg = FFmpeg.getInstance(context); ffmpeg.execute(cmd, new FFmpegExecuteResponseHandler() { @Override public void onSuccess(String message) { } @Override public void onProgress(String message) { } @Override public void onFailure(String message) { } @Override public void onStart() { } @Override public void onFinish() { } }); } catch (FFmpegCommandAlreadyRunningException e) { }
I found this solution in a lauffenp comment on this issue: https://github.com/WritingMinds/ffmpeg-android-java/issues/88
source share