无法在过滤器 Parsed_concat_0 上找到未标记的输入板 1 的匹配流

use*_*291 0 windows ffmpeg

我首先使用 ffmpeg 选项将 2 个相同宽度和高度的 gif 转换为 mp4

ffmpeg -i video1.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video1.mp4
ffmpeg -i video2.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video2.mp4
Run Code Online (Sandbox Code Playgroud)

后来我加入了

ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "concat=n=2:v=1:a=1" -f MP4 -y video.mp4
Run Code Online (Sandbox Code Playgroud)

但我得到了错误

Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_concat_0
Run Code Online (Sandbox Code Playgroud)

与过去的其他 mp4 一起加入可以工作,所以我不明白为什么。

Gya*_*yan 5

您的 concat 输入没有音频,但过滤器期望它们,因为a=1. 将其更改为a=0.