Cut out a person or a subject
cutout_subjectCut a person, or any subject you name, out of a ready video or image as a soft matte: white where the subject is, solid inside, with its hair and motion blur soft, and black elsewhere. Returns the matte's Asset ID: bind it with mask= in patch_film. How it works: the subject is found and tracked on every frame, then matted from one frame where all of it is in the picture, forward to the end of the range and backward to its start; every frame where the subject is not in the picture is black. So, before you call it, look at the footage with preview_frame or read_asset and pass at, a source second where all of the subject is in the picture and nothing covers it (null lets it pick one). For a video, pass startTime and endTime with only the source range where the subject is on screen, from when it comes in to when it leaves, inside the shots you build: only that range is cut out, at about 76 credits a minute of it, billed by the second. The matte is black before startTime and ends at endTime, so mask= lines up with the footage's source time as it is. null for both cuts out the whole video. An image takes null for startTime, endTime and at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | A source second where all of the subject is in the picture and nothing covers it, which you checked with preview_frame or read_asset. null picks such a frame itself. An image takes null. | |
| clipId | Yes | The film clip that plays this asset, when space or atSpace needs one and several clips play it. null picks the clip that shows the asset at that time. | |
| assetId | Yes | ||
| atSpace | Yes | What this call's times are. null or source: seconds into the asset file. timeline: seconds of the film, read through the clip that plays the asset then (clipId to pick one). | |
| endTime | Yes | Source second to stop reading at, or null for the asset's end. null for both reads the whole asset. | |
| subject | Yes | What to find, in a few words: "person", "the dog", "the red car", "the woman in the red coat". null is a person. Everything the words fit is found, so name what sets one apart to get one. Name one kind of thing: words that join two ("the man and the microphone") find neither. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| startTime | Yes | Source second to start reading at, or null for the asset's start. Pass the range of the shot you build. |