Skip to main content

Overview

The VideoBGRemover API offers multiple background options for different use cases. This guide covers all formats and shows you how to use transparent videos in your own projects.

🎨 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:

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

Important: Use -c:v libvpx-vp9 decoder to preserve alpha channels!
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

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

Advanced Positioning & Scaling

Positioning Options

Format Recommendations

Choose Your Format

Use WebM VP9 - Small files, excellent quality, but requires VP9 decoderFallback: Use Stacked Video if VP9 decoder unavailable
Use MOV ProRes - Highest quality, works with all professional editors
Use Stacked Video - Universal compatibility, perfect for analysis
Use PNG Sequence - Maximum quality, individual frame access
Use Pro Bundle - Complete separation of color, alpha, and audio

Testing Your Setup

Before processing videos, test your FFmpeg installation:

Common Issues & Solutions

WebM Transparency Not Working

Problem: WebM video appears opaque instead of transparent Solution: Use the correct decoder

Timing Synchronization Issues

Problem: Video and background don’t sync properly Solution: Normalize timestamps

Large File Sizes

Problem: MOV ProRes files are too large Solutions:
  • Smallest files: Use WebM format (10-50x smaller than MOV ProRes)
  • Universal compatibility: Use Stacked Video format (good balance of size and compatibility)

Complete Example Project

Here’s a complete example showing how to process a video and overlay it on a custom background:
This guide covers everything you need to work with transparent videos from the VideoBGRemover API. Choose the format that best fits your workflow and follow the examples for your preferred tool!