Ffmpeg overlay size

I have the following ffmpeg command which places an overlay image on top of the video. After ffmpeg encoding is completed, the overlay image appears too large, larger than the actual size. How to manage width and height dimensions for an overlay image.

ffmpeg -i 1.wmv -s 640x360 -f mp4 -b 800k -acodec libfaac -ab 64k -vf "movie=0:png:dollar.png [wm];[in][wm] overlay=0:0:1 [out]" out.mp4 
+7
source share
2 answers

Try adding a filter with the sentence scale=width:height as follows:

 ffmpeg -i 1.wmv -s 640x360 -f mp4 -b 800k -acodec libfaac -ab 64k -vf "movie=0:png:dollar.png, scale=120:120 [wm];[in][wm] overlay=0:0:1 [out]" out.mp4 
+5
source

Try it, it worked for me: ffmpeg -i basevideo.xxx -vf "movie = overlayvid.xxx [in]; [in] scale = width: height [scale]; [in] [scale] overlay = x: y [out ] "output.xxx

+2
source

All Articles