[FFmpeg-user] FFMPEG Image overlay Fade in and out on Video not working properly, ,

Moritz Barsnick barsnick at gmx.net
Mon Aug 24 13:57:45 CEST 2015


On Mon, Aug 24, 2015 at 04:40:53 -0700, ankur456799 wrote:
> Some thing like this 
> -i input.mp4  -i 34232944.png -filter_complex " -loop 1 [0:v][1:v] 
>  overlay=0:0:enable='between(t,5,10)',fade=t=in:st=5:d=1, 
>  fade=t=out:st=10:d=1  '" -c:v libx264 -crf 23 output.mp4 
> 
> or 
> 
> -i input.mp4  -i 34232944.png -filter_complex " [0:v][1:v]  -loop 1
>  overlay=0:0:enable='between(t,5,10)',fade=t=in:st=5:d=1, 
>  fade=t=out:st=10:d=1  '" -c:v libx264 -crf 23 output.mp4 

Did you read my whole email? You didn't even adapt the filter. Your
filter won't work, as I wrote, you're fading away the combined video!

I literally wrote:
> adding "-loop 1" before the overlay image
and
> -filter_complex "[1:v]fade=t=in:st=5:d=1,fade=t=out:st=10:d=1[over];[0:v][over]overlay=0:0"

which adds up to:

  -i input.mp4 -loop 1 -i 34232944.png -filter_complex "[1:v]fade=t=in:st=5:d=1,fade=t=out:st=10:d=1[over];[0:v][over]overlay=0:0" -c:v libx264 -crf 23 output.mp4

Moritz


More information about the ffmpeg-user mailing list