background_mode=transparent to get a main video + mask video for compositing onto any background.
Workflow
Render with transparent mode
Wait and download
Poll until complete, then download the video and mask from the CDN URLs in the status response.
Composite in your editor
- After Effects
- DaVinci Resolve
- FFmpeg
- Import
character.mp4and the mask video - Place
character.mp4above your background layer - Add the mask as a Track Matte (Luma Matte)
- Character composites over your custom background
Complete script
Full Python script
Full Python script
Tips
Green screen alternative
Green screen alternative
If your editor supports chroma keying, use
background_mode=solid with bg_color=0,255,0 instead. Traditional green screen without a separate mask file.
