我正在尝试在背景上的图像上放置多张图像/ gif。但是我无法缩放覆盖前的所有图像。
String[] command=new String[13];
command[0]="-i";
command[1]=input;
command[2]="-i";
command[3]=thumbnail2;
command[4]="-i";
command[5]=thumbnail;
command[6]="filter_complex";
command[7]="[0:v]scale=0:0[base]";
command[8]="[1:v]scale=30:-1[img1]";
command[9]="[2:v]scale=3000:-1[img2]";
command[10]="[base][img1]overlay=70:70[tmp1]";
command[11]="[tmp1][img2]overlay=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[out]";
command[12]="/storage/emulated/0/Pictures/logo-2000.gif";
fFmpeg.execute(command,
new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {
//for logcat
Log.w(TAG,"Cut started");
}
@Override
public void onProgress(String message) {
Log.w(TAG,message.toString());
}
@Override
public void onFailure(String message) {
Log.w(TAG,message.toString());
Toast.makeText(getApplicationContext(),"Error",Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(String message) {
Log.w(TAG,message.toString());
Toast.makeText(getApplicationContext(),"sucessfully saved",Toast.LENGTH_SHORT).show();
}
@Override
public void onFinish() {
Log.w(TAG,"Cutting video finished");
}
});
请帮助同时缩放图像。
我遇到的错误是:
[NULL @ 0xb3211e00]无法找到适合的输出格式 'filter_complex'filter_complex:无效的参数