Add Fade In and Fade Out to a Video with FFmpeg

Fade a clip in from black and out to black — video and audio together — using the fade and afade filters in one command.

LinuxvideofadecliffmpegLow risk
Run ffmpeg -i input.mp4 -vf "fade=t=in:st=0:d=1,fade=t=out:st=8:d=2" -af "afade=t=in:st=0:d=1,afade=t=out:st=8:d=2" output.mp4 to fade in for 1s and fade out for 2s starting at second 8.

01Command

Command
$ ffmpeg -i input.mp4 -vf "fade=t=in:st=0:d=1,fade=t=out:st=8:d=2" -af "afade=t=in:st=0:d=1,afade=t=out:st=8:d=2" output.mp4

02What it does

The fade filter controls video: t=in starts from black at st with duration d, and t=out darkens to black. Pairing it with afade (its audio twin) prevents the jarring effect of a visual fade over full-volume sound. Set the out fade's st to your clip length minus the fade duration — for a 10-second clip with a 2-second fade-out, st=8 — and chain both filters with a comma in a single -vf/-af argument.

03Risk

RiskLow risk
Requirementsffmpeg (sudo apt install ffmpeg / sudo dnf install ffmpeg); set st values to your clip duration minus the fade length
!Warning: st counts seconds from the start of the clip; if your fade-out start time exceeds the clip length, the fade simply never happens — check the duration with ffprobe first.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Media