I have an FFmpeg command in a script that crossfades a main video with an outro and then overlays a semi-transparent PNG watermark on top of it.
ffmpeg -y -i "$1" -i "outro.mp4" -i "../Watermark/watermark3.png" \
-filter_complex \
"color=black:$res:d=$total[base]; \
[0:v]scale=-2:'max(720,ih)',setpts=PTS-STARTPTS[v0]; \
[1:v]format=yuva420p,fade=in:st=0:d=$fadeduration:alpha=1,setpts=PTS-STARTPTS+(($fadetime)/TB)[v1]; \
[2:v]lut=a=val*0.7[v2]; \
[v2][v0]scale2ref=w=oh*mdar:h=ih*0.1[wm_scaled][vidtmp1]; \
[base][vidtmp1]overlay[tmp]; \
[tmp][v1]overlay,format=yuv420p[tmp2]; \
[tmp2][wm_scaled]overlay=W-w-50:50:format=auto,format=yuva420p[outv]" \
-map "[outv]" -map 0:a:0 -c:v libx264 -crf 17 -c:a copy "$output"
This works well enough, but I want the overlay to a) only display on the main video, and b) fade in and out.
However, trying to add the necessary fade
filters to the watermark:
[2:v]lut=a=val*0.7,fade=in:st=5:d=2:alpha=1,fade=out:st=150:d=2:alpha=1[v2];
...simply fails silently, producing a working output with no watermark to be seen at all.
What's going on here?