Change size of watermark

I'm using this code to watermark images (add a logo). How do I change the size of the watermark to cover a certain percentage of the image

ffmpeg -i folder/s886_01.jpg -i watermark.png -filter_complex overlay=15:15 output.png

Hi,

What there anything useful in the docs page?

ffmpeg documentation

That is a very interesting command line tool, by the way. I hope you become an expert and can teach us all how to use it.

Answering my own question. Here I have chosen to scale from height. It is also possible to scale from width.

height=$(ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 $filename | awk -F '=' '/height/{print $2}')
ffmpeg -i watermark2.png -y -v quiet -vf scale=$height*0.25:-1 scaled.png       #scale watermark
ffmpeg -i $filename -i scaled.png -filter_complex overlay=15:15 output.png      #add watermark

2 Likes