API 参考:http://ffmpeg.org/ffmpeg-all.html#drawtext-1 参考 drawtext 的功能实现设置相关的值就可以
demo1 :实现添加
ffmpeg -pix_fmt yuv420p10le -s 3840x4320 -i 0_all_3840x4320_yuv420p10le.yuv -vf “drawtext=text=V1:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/4:y=2160/4:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V2:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/43:y=2160/4:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V1:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/4:y=2160/43:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V2:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/43:y=2160/43:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf” -vframes 1 out.png -y
ffmpeg -pix_fmt yuv420p10le -s 3840x4320 -i 0_all_3840x4320_yuv420p10le.yuv -vf “drawtext=text=V1:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/4:y=2160/4:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V2:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/43:y=2160/4:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V1:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/4:y=2160/43:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf,drawtext=text=V2:fontcolor=White:shadowcolor=Blue:shadowx=4:shadowy=4:expansion=normal:x=3840/43:y=2160/43:fontsize=200:fontfile=/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf” 0_all_3840x4320_yuv420p10le_text.yuv