ffmpeg commands
Overlays and compositing
These scripts all work on what appears inside the frame. They layer a PNG logo, watermark or mask over a video, tile many clips into one mosaic, or remove a logo or date stamp that was burned into old footage. Each one first scales and crops the video to a fixed frame size, so positions and sizes are predictable, and the header explains each flag. Use them when you need branding on a clip, a grid of many videos at once, or a cleanup pass on camera footage, and change the frame size, the overlay image or the grid dimensions to fit your material.
Center a PNG overlay on a 4:3 640×480 video, silent
center-png-overlay-4x3.sh
The 4:3 version of center-png-overlay-square.sh: fill a 640×480 frame, composite a PNG mask or graphic in the middle, drop the audio, and squeeze the file small with the slowest preset.
Center a PNG logo or watermark on a square 720×720 video
center-png-overlay-square.sh
Crops the video to a 720×720 square, then composites a PNG (with transparency) dead center. Run it once per logo color to make light and dark versions, as the original did with white and black logos.
Composite a centered PNG, then edge-detect the whole frame (4:3 1024×768)
overlay-then-sobel.sh
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.
Remove a burned-in logo or timestamp with delogo, at a steady 29.97 fps
remove-logo-delogo.sh
Takes 10 s from 0:15 of an old camera AVI, fills 1920×1080, blurs out a burned-in logo or date stamp by interpolating its rectangle from the surrounding pixels, and converts the odd camera frame rate to a steady 29.97 fps with motion interpolation. The patch works best on flat backgrounds; on detailed footage it shows as a soft smudge.
Tile up to 100 clips into a 10×10 1920×1080 mosaic with mixed audio
video-mosaic-grid.sh
Builds the filtergraph from the clips in the folder instead of typing 100 inputs by hand: each clip is restarted at time zero, scaled and cropped to a 192×108 tile, and xstack lays the tiles out in a grid. All the audio tracks are mixed together. The original was written out in full; xstack's grid option now does the layout math.
Source: lucidbeaming/ffmpeg-utilities/overlay at v1.0.1