FFMpeg: scale and then overlay keeping overlay aspect ratio I'm trying to scale a video, and then apply an overlay keeping the aspect ration of the same.
This adds the overlay, but it stretches it to the same aspect ratio of the video which is what I'm trying to avoid:
ffmpeg -y -i video.mov -i watermark.png -filter_complex &quot;scale=-1:1280:flags=bicubic,overlay=(main_w-overlay_w)/2:main_h-overlay_h&quot; -crf 0 -preset ultrafast -c:v mpeg4 -qscale:v 10 -c:a: copy out.mp4

Any help will be truly appreciated!
Ended up solving it through scale2ref:
ffmpeg -y -i video.mov -i watermark.png -filter_complex &quot;[0:v]scale=-1:1280:flags=lanczos[bg];[1:v][bg]scale2ref=(250/180)*$ih/8/sar:$ih/8[wm][base];[base][wm]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)-overlay_h&quot; -crf 0 -preset ultrafast -c:v mpeg4 -qscale:v 10 -c:a: copy out.mp4`

Where 250 is the width of the overlay in pixels, and 180 its height.
This outputs a video of N:1280, with an overlay of 250x180 at the bottom-center of it.