Fade in / Fade to black
Watch as an animation →Start from black or fade out to black to mark the start, the end or a big break.
The start of a video, just before a logo, a dramatic pause.
In the edit, combine fade=t=in:st=0:d=0.4, fade=t=out and afade. To pass through black between cuts, use xfade=transition=fadeblack.
Fade a 5-second clip in from black over 0.4 seconds and out to black over its last 0.4 seconds, picture and sound together: ffmpeg -i in.mp4 -vf "fade=t=in:st=0:d=0.4,fade=t=out:st=4.6:d=0.4" -af "afade=t=in:st=0:d=0.4,afade=t=out:st=4.6:d=0.4" out.mp4