Video Class
TheVideo class represents a source video file or URL. It’s the starting point for background removal operations.
Loading Videos
- Node.js
- Python
Background Removal
The main method for removing backgrounds using the API:- Node.js
- Python
Parameters
| Parameter | Type | Description |
|---|---|---|
client | VideoBGRemoverClient | Authenticated API client |
options | RemoveBGOptions | Processing options (optional) |
pollSeconds | number | Status polling interval (default: 2.0) |
onStatus | function | Progress callback (optional) |
Returns
Returns aForeground object representing the transparent video.
Foreground Class
TheForeground class represents a transparent video after background removal. It can be used in compositions.
Creating Foregrounds
- Node.js
- Python
Foreground Properties
- Node.js
- Python
Source Trimming
Use only specific parts of your transparent videos:- Node.js
- Python
RemoveBGOptions
Configure background removal processing:- Node.js
- Python
Format Preferences
| Prefer | Best For | File Size | Compatibility |
|---|---|---|---|
WEBM_VP9 | Web apps, APIs | Small | Good |
MOV_PRORES | Professional editing | Large | Excellent |
STACKED_VIDEO | Universal compatibility | Medium | Universal |
PRO_BUNDLE | Advanced workflows | Medium | Universal |
AUTO | Let system choose | Varies | Good |
Complete Example
Here’s a complete example showing video loading, background removal, and basic composition:- Node.js
- Python
Related Classes
- VideoBGRemoverClient: API client for authentication and job management
- Composition: Video composition and layering
- Background: Background creation guide
- EncoderProfile: Export format configuration
