The simplest form of the edge effect: frei0r's Sobel operator keeps only the outlines (white edges on black), then crop keeps a centered 1024×768 (4:3) window for projection or LED-wall work. Run it on footage that's already been processed (e.g. frei0r-nervous-slowmo-prores.sh output) for layered looks.
frei0r: if ffmpeg reports "Could not find module", point it at the plugin folder. Homebrew on Apple Silicon installs them where ffmpeg doesn't look by default: export FREI0R_PATH=/opt/homebrew/lib/frei0r-1
The command
ffmpeg -i input.mp4 \
-vf "frei0r=sobel,crop=1024:768" \
-r 29.97 \
-c:v libx264 -pix_fmt yuv420p \
output.mp4 What each part does
frei0r=sobel white edges on black
crop=1024:768 centered 1024×768 (input must be at least that)
-r 29.97 -c:v libx264 -pix_fmt yuv420p When to use it
This is for when you want only the outlines of a shot, white edges on black, framed as a centered 1024×768 (4:3) window for projection or an LED wall. The header explains each flag. It's the plain version of the edge effect. For edges combined with glitching, use frei0r-glitch-sobel-baltan.sh or sobel-edge-glitch.sh instead. To composite a graphic before edge detection, see ../overlay/overlay-then-sobel.sh.
Useful variations:
- Feed it already-processed footage for layered looks, such as the output of frei0r-nervous-slowmo-prores.sh. Change the input file name to match.
- Change the crop size to fit a different screen or wall resolution.
- Change
-r 29.97to match your playback system.
If ffmpeg reports "Could not find module", set FREI0R_PATH as the header shows. If the crop step fails, the input is smaller than 1024×768. Scale it up first or pick a smaller crop. If the frame is mostly black, the source probably lacks contrast, so there are few edges to find.
Notes
- Source
- ffmpeg-utilities/notes/commands2.txt (originally run on a glitched, nervous-processed clip)
- Changed
- -vcodec → -c:v; removed the space after the comma