我有这个命令
ffmpeg -y -i a.MOV -itsoffset 00:00:2.061 -i b.MP4 -itsoffset 00:00:4.016 -i c.mp4 -itsoffset 00:00:8.016 -i d.mp4 -filter_complex "[1:a]adelay=4016[a1];..." -map [a1] -map [v] -r 60 -vcodec h264 zusammen.mp4
它应该将除 [a1] 之外的所有内容静音,但事实并非如此。如何将除 [a1] 之外的所有内容静音?
完整命令供参考:
ffmpeg -y -i a.MOV -itsoffset 00:00:2.061 -i b.MP4 -itsoffset 00:00:4.016 -i c.mp4 -itsoffset 00:00:8.016 -i d.mp4 -filter_complex "[1:a]adelay=4016[a1];color=000000:s=1920x1080[hg];[0:v]scale=505:284[ru1];[2:v]scale=505:284[lu1];[3:v]scale=505:284[lu2];[hg][1:v]overlay[a];[a][ru1]overlay=x=1343:y=723[b];[b][lu1]overlay=x=72:y=723[c];[c][lu2]overlay=x=72:y=723[aus_v]" -map [a1] -map [aus_v] -r 60 -vcodec h264 zusammen.mp4
答案1
如果添加 itsoffset,则不要添加 adelay。改用 aresample 来填补初始间隙。
ffmpeg -y -i a.MOV -itsoffset 00:00:2.061 -i b.MP4 -itsoffset 00:00:4.016 -i c.mp4 -itsoffset 00:00:8.016 -i d.mp4 -filter_complex "[1:a]aresample=async=1:first_pts=0[a1];color=000000:s=1920x1080[hg];[0:v]scale=505:284[ru1];[2:v]scale=505:284[lu1];[3:v]scale=505:284[lu2];[hg][1:v]overlay[a];[a][ru1]overlay=x=1343:y=723[b];[b][lu1]overlay=x=72:y=723[c];[c][lu2]overlay=x=72:y=723[aus_v]" -map [a1] -map [aus_v] -r 60 -vcodec h264 zusammen.mp4