wiki:Xfade

Version 1 (modified by llogan, 7 years ago) ( diff )

make initial page

The xfade filter can create transitions between two inputs with various wipes and crossfades.

Examples

MP4 output

Fade between two images. Each image has a duration of 5 seconds. The fade duration is set to 1 second with the duration option, and it occurs at 4.5 seconds using the offset option.

ffmpeg -loop 1 -t 5 -i 1.png -loop 1 -t 5 -i 2.png -filter_complex "[0][1]xfade=transition=fade:duration=1:offset=4.5,format=yuv420p" output.mp4

GIF output

Using the split, palettegen, and paletteuse filters:

ffmpeg -loop 1 -t 5 -i 1.png -loop 1 -t 5 -i 2.png -filter_complex "[0][1]xfade=transition=fade:duration=1:offset=4.5,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif

Gallery

fade fadeblack fadewhite distance
wipeleft wiperight wipeup wipedown
slideleft slideright slideup slidedown
smoothleft smoothright smoothup smoothdown
circlecrop rectcrop radial

Attachments (56)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.