Find and track a subject
segment_subjectFind and track a subject named in a few words in a ready video or image. Returns a mask Asset ID, white where the subject is on each frame and black elsewhere (a hard edge), and for a video an object track of its box ten times a second, with when it is in the picture, the first time all of it is, and where it is largest. Everything the words fit is in the mask: two people for "person" when two are on screen, so name what sets one apart to get one. Bind the mask with mask= on a clip, link it into an effect that needs a person mask, or move a graphic with the subject by on the track. For a soft cut-out with hair and motion blur, use cutout_subject. at is a source second where you saw the subject (null searches from the start of the range). For a video, pass startTime and endTime with the source range to read: only that range is read, at about 57 credits a minute of it, billed by the second. The mask is black before startTime and ends at endTime, on the footage's source time. null for both reads 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. |