简体   繁体   中英

Android ffmpeg concat two video sound error

This is my command when I am trying to join two video with different 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

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
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM