ffmpeg: overlay a png image on a video with custom transparency?

RocketNuts

Suppose I have a video foo.mkv and an image bar.png (which happens to contains an alpha channel). I can blend this image over the video like this:

ffmpeg 
 -i foo.mkv 
 -i bar.png 
 -filter_complex "[0:v][1:v]overlay" 
 -vcodec libx264 
 myresult.mkv

(using multiple lines here for readability, normally this is one command line).

Now, besides the png image having an alpha channel of its own, I would also apply a custom overall transparency when blending this image over the video.

In the above example, the image would be visible 100% on top of the video — or at least the parts where its alpha channel is fully opaque.

Is there a way to add a custom overall opacity or transparency blend factor, something like opacity=0.5 or whatever, which would make the image only 50% visible?

Gyan

Another option besides geq is colorchannelmixer.

[1:v]format=argb,colorchannelmixer=aa=0.5[zork]

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Overlay image on video using ffmpeg with adjustable png image

From Dev

Update PNG overlay on video with ffmpeg

From Dev

Add image overlay on video FFmpeg

From Dev

Overlay a PNG image (made in photoshop with transparency) on to a JPG using PHP

From Dev

How to overlay a transparent PNG over video and scale to video size in FFmpeg

From Dev

FFMPEG : overlay image on video and retain size

From Dev

Overlay a video over an image using ffmpeg

From Dev

Add image with scale + rotation to video overlay with FFMPEG?

From Dev

How to overlay a png to piped video source with audio mixed in via ffmpeg?

From Dev

Overlay circular video with transparency with maskedmerge

From Dev

How can I overlay PNGs with transparency over a video? (each PNG should cover one frame)

From Dev

ffmpeg overlay transparent animated gif over video and keep gif background transparency

From Dev

overlay transparency video on top of other video

From Dev

ffmpeg delay video in overlay

From Dev

ffmpeg overlay video on another

From Dev

Loop a video overlay with ffmpeg

From Dev

Image with transparency over video

From Dev

CSS image overlay with color and transparency

From Dev

FFMPEG move source video up inside overlay image frame box

From Dev

Can I resize, pad a video and overlay an image in one step with FFMPEG?

From Dev

FFmpeg messes up image overlay's width after adding it to a video

From Dev

ffmpeg: Is there a way to create video from images and overlay on image at same time?

From Dev

Animated GIF overlay is not looping on Video built from Image FFmpeg

From Dev

how to set opacity/transparency of overlay using ffmpeg?

From Dev

Overlay PNG on image

From Dev

how to preserve transparency when scaling PNG with ffmpeg

From Dev

Delayed video overlay using FFmpeg

From Dev

ffmpeg: overlay multiple images to a video

From

ffmpeg overlay timstamp over video

Related Related

  1. 1

    Overlay image on video using ffmpeg with adjustable png image

  2. 2

    Update PNG overlay on video with ffmpeg

  3. 3

    Add image overlay on video FFmpeg

  4. 4

    Overlay a PNG image (made in photoshop with transparency) on to a JPG using PHP

  5. 5

    How to overlay a transparent PNG over video and scale to video size in FFmpeg

  6. 6

    FFMPEG : overlay image on video and retain size

  7. 7

    Overlay a video over an image using ffmpeg

  8. 8

    Add image with scale + rotation to video overlay with FFMPEG?

  9. 9

    How to overlay a png to piped video source with audio mixed in via ffmpeg?

  10. 10

    Overlay circular video with transparency with maskedmerge

  11. 11

    How can I overlay PNGs with transparency over a video? (each PNG should cover one frame)

  12. 12

    ffmpeg overlay transparent animated gif over video and keep gif background transparency

  13. 13

    overlay transparency video on top of other video

  14. 14

    ffmpeg delay video in overlay

  15. 15

    ffmpeg overlay video on another

  16. 16

    Loop a video overlay with ffmpeg

  17. 17

    Image with transparency over video

  18. 18

    CSS image overlay with color and transparency

  19. 19

    FFMPEG move source video up inside overlay image frame box

  20. 20

    Can I resize, pad a video and overlay an image in one step with FFMPEG?

  21. 21

    FFmpeg messes up image overlay's width after adding it to a video

  22. 22

    ffmpeg: Is there a way to create video from images and overlay on image at same time?

  23. 23

    Animated GIF overlay is not looping on Video built from Image FFmpeg

  24. 24

    how to set opacity/transparency of overlay using ffmpeg?

  25. 25

    Overlay PNG on image

  26. 26

    how to preserve transparency when scaling PNG with ffmpeg

  27. 27

    Delayed video overlay using FFmpeg

  28. 28

    ffmpeg: overlay multiple images to a video

  29. 29

    ffmpeg overlay timstamp over video

HotTag

Archive