1. Understanding the Delogo Filter
The delogo filter suppresses a rectangular logo or watermark by interpolating pixels from the immediate surroundings. Rather than applying a destructive Gaussian blur or pixelated mosaic filter, it samples the clean boundary pixels outside the target bounding box and computes an interior reconstruction using a discretized numerical solution of Laplace’s equation:
By enforcing smooth second-order derivatives, the filter reconstructs color gradients across the removed area, rendering stationary bugs virtually invisible against natural backgrounds like skies, water, or textured surfaces.
2. Essential Parameters of the Delogo Filter
| Parameter | Type | Default | Description |
|---|---|---|---|
x |
Integer | None (Required) | The horizontal offset in pixels of the top-left corner of the logo. |
y |
Integer | None (Required) | The vertical offset in pixels of the top-left corner of the logo. |
w |
Integer | None (Required) | The width of the logo rectangle in pixels. |
h |
Integer | None (Required) | The height of the logo rectangle in pixels. |
band / t |
Integer | 4 | The thickness of the border rectangle used for sampling surrounding pixels. |
show |
Boolean | 0 | When set to 1, draws a green bounding box around the target region for alignment checks. |
3. Step-by-Step Command Line Walkthrough
Step 1: Previewing the Coordinates with the Green Box
Never encode a full video blind. Use FFmpeg with show=1 and preview a single frame using ffplay or save a test frame:
Verify that the green outline fully envelops the watermark with at least 2 to 4 pixels of padding on all sides.
Step 2: Production Video Clean & Lossless Audio Passthrough
Once you have confirmed coordinates, run the production render. Always pass -c:a copy to prevent audio re-encoding:
💡 Video Engineering Tip: The Band Parameter
Setting band=1 is ideal for sharp high-contrast logos where sampling closer to the boundary prevents edge halos. If the surrounding background has gradients (like sunset skies), setting band=4 softens transitions and blends more naturally.
4. Delogo vs Removelogo: What is the Difference?
While delogo accepts simple rectangular coordinate numbers (x, y, w, h), the removelogo filter operates on an arbitrary-shaped bitmap mask file:
- Input format:
removelogotakes a monochrome Portable BitMap (.pbm) or gray image where white pixels denote the exact shape of the logo to remove. - Complex shapes: Ideal for non-rectangular logos, cursive station signatures, or circular channel icons.
- Syntax:
ffmpeg -i input.mp4 -vf "removelogo=filename=mask.pbm" -c:a copy output.mp4.
5. Hardware Acceleration & NVENC Performance Benchmarks
Because spatial interpolation requires reading and synthesizing pixel values on every frame, high-bitrate 4K media benefits greatly from hardware acceleration:
| Encoder | Hardware | 1080p 60fps Speed | 4K 30fps Speed |
|---|---|---|---|
libx264 (crf 18) |
AMD Ryzen 9 7950X | 94 fps (1.5x realtime) | 28 fps (0.9x realtime) |
h264_nvenc |
NVIDIA RTX 4080 | 285 fps (4.7x realtime) | 86 fps (2.8x realtime) |
hevc_nvenc |
NVIDIA RTX 4080 | 240 fps (4.0x realtime) | 74 fps (2.4x realtime) |
Summary & Best Practices
- Always test boundary boxes first with
show=1. - Keep the selection box as small and tight as possible to minimize the interpolated surface area.
- Never re-encode audio: use
-c:a copyto preserve original fidelity. - For fast web-based spatial delogo without installing command-line tools, use our hardware-accelerated Online Video Studio.