this is my command when im try to join two video with diffrent resolution with ffmpeg
String[] complexCommand = {
"ffmpeg","-y","-i",
paht_1,
"-i",
path_2,
"-filter_complex",
"[0:v]scale=720:1280,setdar=720/1280[outv0];[1:v]scale=720:1280,setdar=720/1280[outv1];[outv0][outv1]concat=n=2:v=1:a=0[outv];[0:a][1:a]concat=n=2:v=0:a=1[outa]",
"-map",
"[outv]",
"-map",
"[outv]",
"-r",
"25",
"-b",
"10M",
"-preset",
"superfast",
filePath_video_out
};
and this is my error
/mobile-ffmpeg: [NULL @ 0x7c5ce21600] Unable to find a suitable output format for 'ffmpeg'
/mobile-ffmpeg: ffmpeg: Invalid argument
CodePudding user response:
you should repmove "ffmpeg" at first then change second outv to outa same this
String[] complexCommand = {
"-y","-i",
paht_1,
"-i",
path_2,
"-filter_complex",
"[0:v]scale=720:1280,setdar=720/1280[outv0];[1:v]scale=720:1280,setdar=720/1280[outv1];[outv0][outv1]concat=n=2:v=1:a=0[outv];[0:a][1:a]concat=n=2:v=0:a=1[outa]",
"-map",
"[outv]",
"-map",
"[outa]",
"-r",
"25",
"-b",
"10M",
"-preset",
"superfast",
filePath_video_out
};