FFmpeg filter_complex 合并两个命令

FFmpeg filter_complex merging two commands

我在合并这两个命令时遇到了问题,如果有人可以帮助我将最上面的转置和水印合并到第二个命令中,我将不胜感激。我尝试了一些方法,例如:

ffmpeg -i .\test1.flv -i .\test2.flv -loop 1 -i .\watermark.png -filter_complex "[0]transpose=1[a];[1]transpose=1[b];[a][b]hstack[c];[c][2]overlay=W-w-5:H-h-5:shortest=1; [0:v]setpts=PTS-STARTPTS, pad=iw*2:ih[bg]; [1:v]setpts=PTS-STARTPTS[fg]; amerge,pan=stereo:c0<c0+c2:c1<c1+c3" -c:v libx264 -f mp4 -threads 24 -y matt.mp4 

ffmpeg -i .\test1.flv -i .\test2.flv -loop 1 -i .\watermark.png -filter_complex "[0:v]setpts=PTS-STARTPTS, pad=iw*2:ih[bg]; [1:v]setpts=PTS-STARTPTS[fg]; amerge,pan=stereo:c0<c0+c2:c1<c1+c3;[0]transpose=1[a];[1]transpose=1[b];[a][b]hstack[c];[c][2]overlay=W-w-5:H-h-5:shortest=1" -c:v libx264 -f mp4 -threads 24 -y matt.mp4 

谢谢大家!

如果我理解你的意图是正确的,这就是你想要的

ffmpeg -i .\test1.flv -i .\test2.flv -loop 1 -i .\watermark.png -filter_complex
        "[0]setpts=PTS-STARTPTS,transpose=1[a];
         [1]setpts=PTS-STARTPTS,transpose=1[b];
         [a][b]hstack[c];
         [c][2]overlay=W-w-5:H-h-5:shortest=1[v];
         [0]asetpts=PTS-STARTPTS[x];[1]asetpts=PTS-STARTPTS[y];
         [x][y]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[a]"
-map "[v]" -map "[a]" -c:v libx264 -f mp4 -threads 24 -y matt.mp4