2

是否可以在一个 ffmpeg 命令中包含电影覆盖和绘制文本。

我尝试了命令,但它给出了错误

[drawtext @ 03B2BBC0] Key '"fontsize' not found.
[drawtext @ 03B14F20] Error parsing options string: '"fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text=shotName:x=(w)/5:y=(h)/1"'Error initializing filter 'drawtext' with args '"fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text=shotName:x=(w)/5:y=(h)/1"'
Error opening filters!

命令 :

ffmpeg -i D:/imagesequence/background.jpg -vf "movie='D\:/imagesequence/dpx/thumbnail.jpg' [link1]; [in][link1]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/3 [int];[int][link1]drawtext=\"fontsize=28:fontcolor=White:fontfile='/Windows/Fonts/arial.ttf':text='shotName':x=(w)/5:y=(h)/1\"[out]" D:/imagesequence/dpx/final_with_text_mod_04.jpg

4

1 回答 1

3

我尝试了以下它给出了预期的输出,非常感谢Ben

ffmpeg -i D:/imagesequence/background.jpg -vf "movie='D\:/imagesequence/dpx/thumbnail.jpg' [watermark]; [in][watermark] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/3[water];[water] drawtext=fontsize=18:fontcolor=Yellow:fontfile=/Windows/Fonts/arial.ttf:text='shotcam':x=(w)/2:y=(h)-25,drawtext=fontsize=18:fontcolor=Yellow:fontfile=/Windows/Fonts/arial.ttf:text='Frame \:':x=(w)/1.2:y=(h)-25[out]" D:/imagesequence/dpx/final_with_text_mod_04.jpg
于 2012-06-22T09:38:20.563 回答