add_video_layer
Add a video or image layer to a track with specified source and timeline points; automatically pairs linked audio on the same track's audio lane.
Instructions
Add a visual layer from an imported Video or Image item onto a track and return its record; an audio-only item is refused and pointed at add_audio_layer. Video: src_in_us/src_out_us are the source in/out points, t_start_us/t_end_us the timeline span. Image: an ImageOverlay over the timeline range; omit src_in_us/src_out_us. When a Video has an audio stream and auto_pair_audio_on_import is on (the default), a linked dialogue Audio layer lands on the SAME track's audio lane, committed atomically — an occupied lane rejects the whole call naming the blocker. The record always carries audio_layer_id/link_id/audio (null when unpaired).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| media_id | Yes | Media id. | |
| t_end_us | Yes | Timeline end (exclusive), µs. | |
| track_id | Yes | Track id. | |
| src_in_us | No | Source in point, µs. Required for Video; ignored for an Image. | |
| src_out_us | No | Source out point (exclusive), µs. Required for Video; ignored for an Image. | |
| t_start_us | Yes | Timeline start, µs. | |
| composition_id | No | Optional cross-check: the composition `track_id` belongs to; refused on mismatch. The track alone fixes the composition. |