#10128(ffmpeg:new): [Feature request] Blend mode for overlay
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Type: 1et0ovnu6lk6 | enhancement Status: new | Priority: wish Component: ffmpeg | Version: Keywords: ffmpeg, | unspecified blend mode | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- 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 -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Owner: (none) 1et0ovnu6lk6 | Type: enhancement | Status: closed Priority: wish | Component: ffmpeg Version: unspecified | Resolution: invalid Keywords: ffmpeg, | Blocked By: blend mode | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Elon Musk): * status: new => closed * resolution: => invalid Comment: Already possible. See documentation. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Owner: (none) 1et0ovnu6lk6 | Type: enhancement | Status: closed Priority: wish | Component: ffmpeg Version: unspecified | Resolution: invalid Keywords: ffmpeg, | Blocked By: blend mode | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by 1et0ovnu6lk6): Replying to [comment:1 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" -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
Replying to [comment:1 Elon Musk]:
Already possible. See documentation.
I looked, but I'm not professional enough on this subject, and I can't
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Owner: (none) 1et0ovnu6lk6 | Type: enhancement | Status: closed Priority: wish | Component: ffmpeg Version: unspecified | Resolution: invalid Keywords: ffmpeg, | Blocked By: blend mode | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by 1et0ovnu6lk6): Replying to [comment:2 1et0ovnu6lk6]: 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"
[Parsed_blend_2 @ 0000026231f60f80] First input link top parameters (size 480x848) do not match the corresponding second input link bottom
I got this: parameters (size 200x83) -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Owner: (none) 1et0ovnu6lk6 | Type: enhancement | Status: closed Priority: wish | Component: ffmpeg Version: unspecified | Resolution: invalid Keywords: ffmpeg, | Blocked By: blend mode | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by 1et0ovnu6lk6): 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 -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10128: [Feature request] Blend mode for overlay -------------------------------------+------------------------------------- Reporter: | Owner: (none) 1et0ovnu6lk6 | Type: enhancement | Status: closed Priority: wish | Component: ffmpeg Version: unspecified | Resolution: invalid Keywords: ffmpeg, | Blocked By: blend mode | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Elon Musk): 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. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10128#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg