Fade in/out PNG watermark overlay on video

It turns out the reason for this annoying and - for me - longstanding issue was caused by the PNG technically having no frames: because it has no frames it has nothing to animate, and therefore nothing to fade in or out.

It's annoying that there's no error-checking for this and that the overlay is simply dropped from the stream, but in either case once you know what the issue is it's very simply solved by adding a -loop option directly before the path to the image:

-i source.mkv -i outro.mp4 -loop 1 -i watermark.png ...

You may also need to add the shortest=1 option to the overlay filter when applying the overlay, to make sure that the overlay stops with the end of the video rather than going on to loop indefinitely:

[mainvid][watermark]overlay=W-w-50:50:shortest=1[outv];