ffmpeg Tools Français

Add a fade-in and fade-out to a video

A fade at the beginning and end gives any video a polished look: the picture gradually appears from black, disappears the same way, and the audio follows. You just need to specify the durations and when the fade-out starts.

Updated on

Total video length minus the fade-out length. For example 59 for a one-minute video with a one-second fade. To find the length, use the file information page.

The lower the number, the better the image and the bigger the file.

  

How to use it

  1. Install ffmpeg if you haven't already.
  2. Open a terminal in the folder containing your file.
  3. Copy the generated command, adjust the file names if needed, then run it.
  4. Open the resulting file to check the result.

The filters used

The fade filter works on the picture: t=in for the fade-in, t=out for the fade-out, st for the start time and d for the duration. The afade filter does the same for the audio. Both must get the same durations so the picture and audio stay in sync.

Video length

For a 30-second video with a 2-second fade-out, the fade must start at 28 seconds.

Show a video file's information

Frequently asked questions

How do I find my video's length?

Use the file information page: it generates the ffprobe command that displays the length in seconds. Then subtract the fade-out length to get its start point.

What happens if the fade-out starts too late?

If the start time is past the end of the video, the fade is never reached and the ending stays visible. If it's too early, the video stays black until the end. Check the result.

Is the video re-encoded?

Yes, because a fade modifies every frame: it can't be done without re-encoding. A CRF of 18 to 20 keeps the loss at an invisible level.

Can I do a crossfade between two videos?

Yes, with the xfade filter, but the command is longer. For a simple fade at the start and end, this page is enough.

More tools