gpt4 book ai didi

java - Android ffmpeg concat 两个视频声音错误

转载 作者:行者123 更新时间:2023-12-04 23:01:22 28 4
gpt4 key购买 nike

这是我的命令
当我尝试使用 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
};
这是我的错误
/mobile-ffmpeg: [NULL @ 0x7c5ce21600] Unable to find a suitable output format for 'ffmpeg'
/mobile-ffmpeg: ffmpeg: 无效参数

最佳答案

你应该首先删除“ffmpeg”
然后将第二个 outv 更改为 outa
同样这个

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

关于java - Android ffmpeg concat 两个视频声音错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69987286/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com