#10128 closed enhancement (invalid)
[Feature request] Blend mode for overlay
Reported by: | 1et0ovnu6lk6 | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | ffmpeg |
Version: | unspecified | Keywords: | ffmpeg, blend mode |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hello, it would be great if you add "Blend mode" (like in photoshop / premiere) for images that using for watermarks on videos.
Here is how it looking in photoshop:
https://photographylife.com/wp-content/uploads/2021/04/BlendMode1.png
Without blend mode (overlay):
https://i.imgur.com/SLrrVPx.png
With:
https://i.imgur.com/IjWXBvf.png
Change History (5)
follow-up: 2 comment:1 by , 2 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 2 years ago
Replying to Elon Musk:
Already possible. See documentation.
I looked, but I'm not professional enough on this subject, and I can't figure out the parameters for such watermark. If you have time, could you please help me make a query that would impose such a watermark? Here is my "filter_complex":
-i "!!!\WM.png" -filter_complex "[0]scale='if(gt(iw,ih),854,-2)':'if(gt(iw,ih),-2,854)'[scaled];[scaled][1]overlay=x=(W-w)/2:y=H-h-100" -c:a aac -b:a 128k -c:v libx264 -preset veryfast -crf 23 -maxrate 5M -bufsize 10M "done.mp4"
comment:3 by , 2 years ago
Replying to 1et0ovnu6lk6:
Replying to Elon Musk:
Already possible. See documentation.
I looked, but I'm not professional enough on this subject, and I can't figure out the parameters for such watermark. If you have time, could you please help me make a query that would impose such a watermark? Here is my "filter_complex":
-i "!!!\WM.png" -filter_complex "[0]scale='if(gt(iw,ih),854,-2)':'if(gt(iw,ih),-2,854)'[scaled];[scaled][1]overlay=x=(W-w)/2:y=H-h-100" -c:a aac -b:a 128k -c:v libx264 -preset veryfast -crf 23 -maxrate 5M -bufsize 10M "done.mp4"
I think it's not possible for image watermarks which are smaller than those of the video. When I using this:
-filter_complex "[0:v] format=rgba [bg]; [1:v] format=rgba [fg]; [bg][fg] blend=all_mode='multiply':all_opacity=1, format=rgba"
I got this:
[Parsed_blend_2 @ 0000026231f60f80] First input link top parameters (size 480x848) do not match the corresponding second input link bottom parameters (size 200x83)
comment:4 by , 2 years ago
I googled hard but there is no way to use blend mode on watermark image smaller than video. It's been asked 8 years ago and still no answer:
https://ffmpeg-user.ffmpeg.narkive.com/gZ23YYCA/how-to-blend-logo-and-video-with-transparent-effect
And even if I resize watermark to video size I got green screen:
https://i.imgur.com/iselDMT.jpg
comment:5 by , 2 years ago
Learn how to use ffmpeg properly first or ask someone else to teach you.
The stream video size can be properly padded with alpha to needed video size and correct pixel format used when blending with picked blending mode.
Already possible. See documentation.