Concat 过滤器丢帧

Concat 过滤器丢帧

此命令应生成 30 帧的视频,但实际生成的视频只有 3 帧。如何解决此问题?

ffmpeg -i f1/image1.png -i f2/image2.png ... -i f30/image30.png \
-filter_complex " \
[0]drawtext=text='text1'[t0]; \
[1]drawtext=text='text2'[t1]; \
...
[29]drawtext=text='text30'[t29]; \
[t0][t1]...[t29]concat=n=30[out]" -map "[out]" result.mp4

答案1

修复时间戳设定点

ffmpeg -i f1/image1.png -i f2/image2.png ... -i f30/image30.png \
-filter_complex " \
[0]drawtext=text='text1'[t0]; \
[1]drawtext=text='text2'[t1]; \
...
[29]drawtext=text='text30'[t29]; \
[t0][t1]...[t29]concat=n=30,setpts=N/(FRAME_RATE*TB)[out]" -map "[out]" result.mp4

相关内容