I need to create a video with a set of images and I successfully did this with ffmpeg. now i need a way to add credits to the singer and video creator. This is part of the work involved in the video creation tool im implementing. Can someone tell me how to add text to an image with ffmpeg.
Thanks in advance.
ffmpeg -i input.jpg -vf "drawtext=text='Test Text':fontcolor=white:fontsize=75:x=1002:y=100:" output.jpg
this code will write Test Text to the input.jpg and you will get it as output.jpg with text on it
if you are using ffmpeg you can do this using drawtext filter;
I have added local Time on video with text TEST - prefix and black box as background with 0.7 opacity, you can add more parameters like font size etc as well;
ffmpeg -i input.mp4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:text='TEST- %{localtime\:%T}': fontcolor=white:box=1:[email protected]: x=70: y=400" -y output.mp4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With