The following examples show how you can use FFMPEG to do fade-in fade-out for audio and/or video.
ffmpeg -i input.mp4 -vf “fade=t=in:st=0:d=10,fade=t=out:st=10:d=5” -c:a copy output.mp4
The example above applies both fade-in and fade-out effects for video, but not for audio.
ffmpeg -i input.mp4 -af “afade=t=in:st=0:d=5” -c:v copy output.mp4
The example above applies fade-in effect for audio, but not for video. The parameters are pretty much self explanatory. A combination of different parameters can be used to meet your editing requirements.