ffmpeg add semi transparent watermark(png) with different size
Use the lut filter before overlay
ffmpeg -y -i input.mp4 -i watermark.png -filter_complex
"[1]lut=a=val*0.3[a];[0][a]overlay=0:0"
-c:v libx264 -an output.mp4
Logo scaled relative to image size v1 (centered)
ffmpeg -y \
-i "bird.jpg" \
-i "logo.png" \
-filter_complex "\
[1][0]scale2ref=h=ow/mdar:w=iw/4[#A logo][bird];\
[#A logo]format=argb,colorchannelmixer=aa=0.5[#B logo transparent];\
[bird][#B logo transparent]overlay\
=(main_w-w)/2:(main_h-h)/2" \
image_with_logo.jpg
#A preserve aspect ratio of logo, scale width of logo to 1/4 of image width
#B add alpha channel, reduce opacity to 50%
# overlay image an logo
#position is horizontally and vertically centered
Logo scaled relative to image size v2 (bottom right with margin)
ffmpeg -y \
-i "bird.jpg" \
-i "logo.png" \
-filter_complex "\
[1][0]scale2ref=h=ow/mdar:w=iw/4[#A logo][bird];\
[#A logo]format=argb,colorchannelmixer=aa=0.5[#B logo transparent];\
[bird][#B logo transparent]overlay\
=(main_w-w)-(main_w*0.1):(main_h-h)-(main_h*0.1)" \
image_with_logo.jpg
#A preserve aspect ratio of logo, scale width of logo to 1/4 of image width
#B add alpha channel, reduce opacity to 50%
# overlay image an logo
# position: bottom right, with a margin of 10% of the edges