在 FFMPEG 中,“:enable=between(t,5,10)”不是从头开始

in FFMPEG, ":enable=between(t,5,10)" not starting at begining

我有三个输入;两张图片和一个图片序列文件夹。 图像序列总长度为3秒

ffmpeg
    -loop 1 -t 10 -i image1.jpg
    -loop 1 -t 10 -i image2.jpg
    -i png/out%d.png
    -filter_complex "
        [0][1]xfade=transition=fade:duration=0.15:offset=2.5[a];
        [a][2]overlay=0:0:enable='between(t,5,5)'[video]
    " -map "[video]"
    -crf 30 -c:v libx264 -pix_fmt yuv420p -s 918x1632 -r 12 -movflags +faststart -t 10 out.mp4

在 out.mp4 的第 5 秒显示图像序列,但不是在它的开头。似乎在渲染到第 5 秒时它已经开始了 behind/invisibly.

如何强制 FFMPEG 正确执行?

您必须调整图像序列的时间戳,使起始时间戳与启用范围的起始时间相同。

在你的情况下,你可以使用它的偏移量。

-itsoffset 5 -i png/out%d.png