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.
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.mp402What 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
!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
- FFmpeg Filters Documentation (fade, afade)Evidence: The fade filter accepts type in/out, start time st and duration d for video; afade applies the same to audio.
- ffmpeg(1) — Linux manual pageEvidence: Documents combining multiple filters with commas in -vf and -af chains.
Last verified: 2026-09-18 · Category: Media