Skip to main content

Overview

The VideoBGRemover API offers multiple background options for different use cases. This guide covers the technical details of each format and how to use them in your projects. For complete workflows and implementation examples, see the Background Removal Guide.

🎨 Color Backgrounds

Replace background with solid colors using hex codes

✨ Transparent Videos

Create videos with transparency for custom overlays

Quick Navigation

Color Backgrounds

Perfect for simple background replacement with solid colors. No additional processing needed - just specify a hex color code.

Simple Color Replacement

Replace the background with any solid color using hex codes:
cURL

Transparent Formats

For advanced compositing, custom backgrounds, and professional workflows. These formats preserve transparency for maximum flexibility. What are transparent formats? Video files that preserve the alpha channel (transparency) so you can overlay them on custom backgrounds. However, they can be tricky to use - WebM works in Chrome but not all browsers, MOV works in Safari but requires specific codecs. When you need custom backgrounds or advanced compositing, use transparent formats:

Format Comparison

Best for: Easy overlay workflows, API usage, small file sizes
Decoder Required: WebM VP9 transparency requires libvpx-vp9 decoder. Works most of the time, but not guaranteed on all systems.

Using WebM Videos in Your Projects

WebM Alpha Channel Issue: The default VP9 decoder strips alpha channels. Always use libvpx-vp9 decoder for proper transparency. If unavailable, use Stacked Video format instead.

MOV ProRes (Professional)

Best for: Professional video editing (Final Cut Pro, Premiere Pro)

Using MOV Videos

PNG Sequence

Best for: GIF creation, frame-by-frame editing, maximum quality

Using PNG Sequences

GIF (Animated)

Best for: Social media, universal compatibility, short clips (under 10s)
File Size Warning: GIF exports work best for short clips (under 10s). Longer videos may result in very large file sizes.
cURL

GIF Format Details

  • File Extension: .gif
  • Transparency: Binary transparency; GIF does not preserve partial alpha values
  • Colors: 256 colors maximum
  • Audio: Not supported
  • Compatibility: Broad browser support; confirm the upload requirements of each social platform
  • Best For: Social media posts, memes, short animations
GIF files use lossless compression but are limited to 256 colors. For better quality with smaller file sizes on modern platforms, consider WebP format instead.

WebP (Animated)

Best for: Modern web applications, excellent quality with small file sizes (under 30s)
cURL

WebP Format Details

  • File Extension: .webp
  • Transparency: Full alpha channel support
  • Colors: True color (millions of colors)
  • Audio: Not supported
  • Compatibility: Modern browsers (Chrome, Firefox, Edge, Safari 14+)
  • Best For: Web applications, modern platforms, better quality than GIF
WebP provides superior quality and smaller file sizes compared to GIF, but requires modern browser support. Works best for clips under 30 seconds.

Lottie JSON (Mobile Apps)

Best for: Mobile applications (iOS/Android), interactive animations, very small file sizes (under 5s)
Optimized for Mobile: Lottie exports work best for short clips (under 5s). Longer videos may result in large JSON files and performance issues on mobile devices.
cURL

Lottie Format Details

  • File Extension: .json
  • Format: JSON with embedded WebP images
  • Transparency: Full alpha channel support
  • Audio: Not supported
  • Compatibility: iOS (Lottie), Android (Lottie), Web (lottie-web)
  • Best For: Mobile apps, interactive UI animations, loading screens

Using Lottie in Mobile Apps

Perfect for Mobile Apps: Lottie JSON format is specifically optimized for iOS and Android applications. The format uses WebP images embedded in JSON for excellent quality and very small file sizes, making it ideal for mobile app animations, loading screens, and interactive UI elements.

Pro Bundle (Professional Workflow)

Best for: Unscreen workflows, ZIP handling, maximum flexibility

Pro Bundle Contents

The Pro Bundle ZIP contains:
  • color.mp4 - Normalized foreground video
  • alpha.mp4 - 8-bit grayscale matte
  • audio.m4a - Audio track (if present)
  • manifest.json - Technical specifications

Using Pro Bundle

Stacked Video (Universal Format)

Best for: Universal compatibility, single file handling (top: video, bottom: mask)

Stacked Video Structure

  • Top Half: Original video (1080x1080)
  • Bottom Half: Grayscale mask (1080x1080)
  • Total Dimensions: 1080x2160 (2:1 aspect ratio)

Using Stacked Videos

Testing Your Setup

Before processing videos, test your FFmpeg installation:
For detailed positioning and scaling techniques, see the Positioning Guide in the Video Composition section.