I am making a video from single image using ffmpeg and draw text on top of the video.
How can I drawtext
that will overlay on top of the scaled video size instead of the image scale?
Right now when I add a text, the X and Y begin from the top left corner of the image, not the scaled video itself. The image has smaller dimensions than video scale, so I need to drawtext regardless of image size. If the text goes outside of image scale, it gets cut off, although the unfilled black border of the remaining scaled video is still there.
This is the command I am using.
ffmpeg -loop 1 -r 1 -i image.jpg -b:v 1M -vf "scale=320:240, drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: text='Test Text': x=200: y=100: fontsize=30: [email protected]: box=1: [email protected]" -t 20 output.mp4