Shuffles frames, keeps only the difference between neighbours (glowing motion edges on black), stretches those edges to full contrast, then interpolates the result into ~3.3× slow motion with audio to match.
The command
ffmpeg -ss 21 -i input.mp4 \
-vf "random=frames=5,tblend=all_mode=difference,normalize=blackpt=black:whitept=white:smoothing=0,minterpolate=fps=100:scd=none,setpts=N/(29.97*TB),scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080,unsharp" \
-af "atempo=0.5,atempo=0.5" \
-r 29.97 \
-c:a aac -b:a 128k \
-c:v libx264 -crf 21 -pix_fmt yuv420p -preset veryfast \
output.mp4 What each part does
-ss 21 start 21 s in
random=frames=5 output frames in random order within a 5-frame
buffer
tblend=all_mode=difference
|frame − previous frame|: static areas go black
normalize=blackpt=black:whitept=white:smoothing=0
stretch the faint differences to full range,
recalculated every frame (no smoothing)
minterpolate=fps=100:scd=none
interpolate to 100 fps, also across cuts
setpts=N/(29.97*TB) play at 29.97 fps (≈ 3.3× slower)
scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080
unsharp default 5×5 sharpen to crisp the edges
-af "atempo=0.5,atempo=0.5"
audio at 0.25× (close to the 0.3× video speed)
-r 29.97
-c:a aac -b:a 128k -c:v libx264 -crf 21 -pix_fmt yuv420p -preset veryfast When to use it
Use this when you want footage dissolved into glowing motion edges on black, slowed and smeared by interpolation: music videos, title backgrounds, abstract loops. It works best on clips with plenty of movement. Skip it when the subject needs to stay recognisable, or when picture and sound must stay in sync. The header explains each flag.
Useful variations:
- Change
-ss 21to start where the action is. - Raise or lower
frames=5to make the shuffle more or less chaotic. - Edit
1920:1080in bothscaleandcropfor other frame sizes.
If the output is mostly black, the source has too little motion. If it looks like crawling noise, normalize is stretching tiny frame-to-frame differences to full contrast. The audio is slowed to 0.25× while the video plays about 0.3× speed, so expect the sound to run past the picture. minterpolate is slow, so test on a short clip first.
Related: sobel-edge-glitch.sh, shuffleframes-stutter.sh, normalize-levels.sh, ../timing/minterpolate-slowmo-with-audio.sh.
Notes
- Source
- ffmpeg-utilities/videogrep.sh (the feart-ant command)
- Changed
- -filter_complex → -vf; -filter:a → -af