Fade-in / Fade-out using FFMPEG

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.

2 thoughts on “Fade-in / Fade-out using FFMPEG

  1. How do you apply fade for video and afade for audio at once? All the examples I am seeing only do fading for either the video or audio alone.
    ffmpeg complains you can’t have both at once e.g.
    ffmpeg -i infile.mp4 -vf ‘fade=t=out:st:27:d=3’ -af ‘afade=t=out:st:25:d:5’ outfile.mp4

  2. The issue was probably caused by the syntax error in your example. Try this:

    ffmpeg -i infile.mp4 -vf “fade=t=out:st=27:d=3” -af “afade=t=out:st=25:d=5” outfile.mp4

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.