ffmpeg drawtext在一个命令中叠加电影

时间:2012-06-22 07:51:55

标签: ffmpeg

是否可以在一个ffmpeg命令中使用movie overlay和drawtext。

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

[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

1 个答案:

答案 0 :(得分: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