To check whether FFmpeg is available on your device you can use the following method.
if (FFmpeg.getInstance(this).isSupported()) {
// ffmpeg is supported
} else {
// ffmpeg is not supported
}
Run FFmpeg command :
FFmpeg ffmpeg = FFmpeg.getInstance(context);
// to execute "ffmpeg -version" command you just need to pass "-version"
ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {}
@Override
public void onProgress(String message) {}
@Override
public void onFailure(String message) {}
@Override
public void onSuccess(String message) {}
@Override
public void onFinish() {}
Please use public void onFailure(String message)
instead of public void onFailure()
From the doc :
Check if FFmpeg is supported
To check whether FFmpeg is available on your device you can use the following method.
if (FFmpeg.getInstance(this).isSupported()) { // ffmpeg is supported } else { // ffmpeg is not supported }
Run FFmpeg command :
FFmpeg ffmpeg = FFmpeg.getInstance(context); // to execute "ffmpeg -version" command you just need to pass "-version" ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
});