Fills a 1024×768 frame, places a PNG in the middle, and then runs Sobel edge detection over the composite, so the logo and the footage turn into outlines together: a single line-drawing look, rather than a clean logo laid over processed video.

Swap the order (Sobel on [0:v] first, then overlay) to keep the logo clean on top of edge-detected footage.

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 -i overlay.png \
  -filter_complex "[0:v]scale=1024:768:force_original_aspect_ratio=increase,crop=1024:768[bg];[bg][1:v]overlay=(W-w)/2:(H-h)/2,frei0r=sobel" \
  -an \
  -c:v libx264 -pix_fmt yuv420p \
  output.mp4

What each part does

[0:v]scale=1024:768:force_original_aspect_ratio=increase,crop=1024:768[bg]
                       fill a 4:3 frame
[bg][1:v]overlay=(W-w)/2:(H-h)/2
                       composite the PNG, centered
frei0r=sobel           edge-detect the composite
-an -c:v libx264 -pix_fmt yuv420p

When to use it

Use this when you want the logo and the footage to read as one line drawing. The PNG is centered in a 1024×768 frame and then the whole composite is edge-detected, so the logo becomes an outline like everything else. The header explains each step.

Don't use it if the logo must stay solid and legible. Swap the order as the header describes, with Sobel on [0:v] first and then the overlay, to keep a clean logo on top of edge-detected footage. For a plain centered logo with no effect, use center-png-overlay-4x3.sh. For edges without a logo, see ../effects/frei0r-sobel-edges.sh.

To change the frame size, edit 1024:768 in both the scale and the crop so they match.

If the output looks wrong:

  • "Could not find module": set FREI0R_PATH as shown in the header. With Homebrew on Apple Silicon, that's /opt/homebrew/lib/frei0r-1.
  • Parts of the picture are missing: the scale-then-crop fills the frame and trims the overflow. Sources that aren't 4:3 lose their sides, or their top and bottom.
  • The logo is only an outline: that's the intended look. Swap the filter order to keep it solid.

Notes

Source
ffmpeg-utilities/notes/commands2.txt (with lucidwhite.png)
Changed
explicit stream labels; W/H shorthand; -vcodec → -c:v