我需要在视频中添加两段文本。第一段文本出现在右下角,持续6秒钟;第二段文本出现在视频中心,持续3秒钟。
以下是我的代码:
ffmpeg -i input.mp4 -vf drawtext="text='Stack Overflow': fontcolor=white: borderw=2: fontfile=Arial Black: fontsize=w*0.04: x=(w-text_w)-(w*0.04): y=(h-text_h)-(w*0.04): enable='between(t,0,6)'", -vf drawtext="text='Stack Overflow': fontcolor=white: borderw=2: fontfile=Arial Black: fontsize=w*0.04: x=(w-text_w)/2: y=(h-text_h)/2: enable='between(t,7,10)'" -codec:a copy output2.mp4
我运行上述代码时没有收到任何错误,但在输出文件中,只有第二个drawtext被应用。