I'm trying to place several overlays on top of each other and fade out the topmost after some frames. Therefore I'm using 2 .png files which should be placed on the final video in the following order:
fademe.png <-- Topmost overlay, should be faded after some frames
overlay.png <-- second overlay, always visible
movie.mov <-- a movie as the bottom layer
I'm using this code to create a PNG encoded .mov from the overlays:
ffmpeg -y -loop 1 -i fademe.png -loop 1 -i overlay.png -filter_complex "[0:0]fade=out:25:25[fad];[1:0][fad] overlay" -vframes 55 -vcodec png overlay.mov
Then I'm using ffmbc to place overlay.mov on top of another video.
(I'm using ffmbc because the final output is going to be ProRes4444)
ffmbc -y -threads 0 -i movie.mov -vf "movie=overlay.mov [watermark]; [in][watermark] overlay [out]" -vcodec libx264 faded.mp4
The output video looks nice until fading starts and
fademe.png [fad] seems to get faded to white and doing some strange things to the colours below until it disappears.
When I'm changing the order in the last
[1:0][fad] overlay to
[fad][1:0] overlay so it looks like this:
ffmpeg -y -loop 1 -i fademe.png -loop 1 -i overlay.png -filter_complex "[0:0]fade=out:25:25[fad];[fad][1:0] overlay" -vframes 55 -vcodec png overlay.mov
the fading looks right, but
overlay.png [1:0] shouldn't be the topmost layer.
My guess is that something wrong happens to the alpha-channel on my first try.
Any suggestions how to solve this problem?