参数/storage/emulated/0/Watermark/test.flv
作为输入文件名提供,但已指定ffprobe
。
compile 'nl.bravobit:android-ffmpeg:1.1.1
String [] command = {"ffprobe", videoPath };
FFprobe ffprobe = FFprobe.getInstance(this);
try {
ffprobe.execute(command, new ExecuteBinaryResponseHandler() {
@Override
public void onSuccess(String message) {
addTextViewToLayout("SUCCESS with output : "+ message);
Logger.print("onSuccess : "+message);
}
@Override
public void onProgress(String message) {
addTextViewToLayout("Started command : ffmpeg "+command);
addTextViewToLayout("progress : "+message);
Logger.print("Started command : ffmpeg "+command.toString());
Logger.print("progress : "+message);
}
@Override
public void onFailure(String message) {
Logger.print("FAILED with output : "+message);
}
@Override
public void onStart() {
Logger.print("onStart");
}
@Override
public void onFinish() {
Logger.print("onFinish");
}
});
} catch (FFprobeCommandAlreadyRunningException e) {
e.printStackTrace();
}
}
ffprobe在Windows,Mac,Ubuntu中运行良好,但在Android中不起作用。
如果有人有经验,请与我分享您的经验。