R
R
Rustam Salavatov2015-02-17 03:14:15
fmpeg
Rustam Salavatov, 2015-02-17 03:14:15

How to overlay PNG vignette in ffmpeg Overlay mode?

Tormented, help me out)
There is an original picture and a vignette It is
necessary to impose one on another in the overlay mode (overlay) via ffmpeg (it will be needed for the video later)
6YgKpAK.jpg
here are the sources
https://yadi.sk/d/l7rKn0zyeiifY
I try this command under Windows and Linux:

"ffmpeg.exe" -y -i  "G:\ffmpeg\3dlut\azaliya.png" -i  "G:\ffmpeg\3dlut\vignete.png" -filter_complex "[0:0][1:0]blend=all_mode=subtract:all_opacity=1"  -vcodec png -s 399x395 "vignete_itog.png"

it turns out a burnt middle, as if it does not see the alpha channel
CsTDSe6.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2015-02-17
@fortunato

The blend filter does not know how to work with the alpha channel. But you can extract this channel separately, then apply it to the composition and overlay it on the original. Something like this:
"ffmpeg.exe" -y -i "G:\ffmpeg\3dlut\azaliya.png" -i "G:\ffmpeg\3dlut\vignete.png" -filter_complex "[0:0][ 1:0] blend=subtract [dark]; [1:0] alphaextract [alpha]; [dark][alpha] alphamerge [darkalpha]; [0:0][darkalpha] overlay" -vcodec png -s 399x395 "vignete_itog .png"
Maybe there is an easier way, but I didn't find it in the ffmpeg documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question