Subclip Media Editing
For cloud background removal of an existing MediaPanel image or video, route to $subclip-background-removal. Do not approximate that request with opacity, masking, generic generation, or an ordinary color-key effect on the unchanged source.
- Call
list_editor_assetsand choose amediaFiles[].id. Never guess IDs. - If the requested file is a supplied assistant attachment, call
import_attachment_to_timelinewith its exact path. For a video represented by.subclip-video-context, use theoriginalPathinvideo-context.json. Do not ask for a second MediaPanel import. If direct native import fails, callimport_attachment_clip_with_ffmpegonce with the requested source in/out. When the undecodable original item is already placed, pass its ID asreplaceItemId; this swaps the source in place instead of adding a duplicate black layer. The tool returns a backgroundjobId; store it and end the in-app agent turn without polling. Subclip resumes the same conversation on completion, cancellation, or error. Never start another conversion merely because it is queued/running. External MCP clients may useget_media_import_status. The fallback preserves a full compatible source and applies those values as a native trim, so the user can extend the item later.- A saved Recorder recording: call
list_recordings(from the editor, it lists the saved recordings with their ids, names and durations), thenimport_recording_to_projectwith thatrecordingId. The edited version on the timeline imports exactly as the Recorder's "Import to Timeline" does: callouts (including the liquid lens), zooms and effects stay editable as native tracks, so do not re-render it. The project must be open in the app for that; if the tool says so, ask the creator to open it. The raw version and Project Media imports are plain video files. WithoutrecordingIdit lists the saved recordings; with it, the recording is added to Project Media and (by default) the timeline.version: "edited"(default) is the finished recording with its cuts, speed changes and click zooms;version: "raw"is the untouched capture.destination: "media"adds it to Project Media only. Ask the creator which version they want when it is not clear. - A fresh screenshot: call
import_screenshot_to_project(whole display, a display by id, or a region). The untouched PNG goes to Project Media and (by default) the timeline. Usetake_screenshotinstead when you only need to look at the screen. - Narration (text to speech): call
generate_speechonce per line, withconfirmed: truewhen the creator asked for it, andtargetDurationSecondsfor the line's length. When it is completed (get_ai_operation), callimport_speech_to_timelinewith thatoperationIdand thestartTime(seconds) of the moment the line describes. Time each line to the event it talks about (for example a click), not to the start of the video. Never passtargetDurationSecondsfor narration: it speeds the voice up to fit, which sounds rushed. Generate atspeed: 1, read each clip's real length fromget_ai_operation, and place the clips back to back (each starts when the previous one ends), so the narration is continuous. Write enough sentences to cover the whole timeline; do not leave silent gaps between short lines. - Audio levels: narration must sit clearly above the recording's audio. Measure both (ffmpeg volumedetect): set narration volume to about 1.8 and the system/recording audio to about 0.1, and check the difference is at least about 12 dB before delivering.
- A saved Recorder recording: call
- Call
place_editor_assetwithkind: mediato create the timeline and canvas item. When no explicit position or container size is supplied, new imports use a full-canvas container at the top-left origin pluscover; switch tocontainonly when the user wants the entire source visible. - Use
set_media_framingfor contain/cover requests.coverplaces a full-canvas media box at the top-left origin and crops the source around its center;containpreserves the whole source. - For a tutorial/screen recording plus talking-head request, call
apply_screenstudio_layoutonce with the exact two item IDs. Do not approximate this with separate raw path updates. The named tool atomically creates a rounded tutorial stage and a circular, muted, bottom-right presenter above it while preserving both items' existing timeline durations. - Keep the talking-head/presenter clip at its natural saved duration. A ScreenStudio-style layout does not imply that the presenter should continue through the tutorial, so never loop, repeat, or extend it to the tutorial end automatically. Use
set_media_loop_and_durationonly when the user explicitly asks to loop or extend that exact item; do not infer this from “ScreenStudio,” “talking head,” “presenter bubble,” or picture-in-picture wording. - Use
adjust_media_transformfor position or container-size changes. PrefersizeMultiplierplus an explicit anchor for relative requests such as “14% larger”; usedeltaX/deltaYfor nudges. Layout resizing must changesize.width/heightand keepscale: 1so the selection box, crop viewport, and visible pixels share one container. Reservescalefor an intentional animated visual transform, not ordinary canvas sizing. Do not useupdate_editor_statefor ordinary transforms. - Plan compositing order before placement. Use
set_media_layer_orderto choose the native composition plane (media,above-motion,above-text, orabove-captions) and put the main scene behind while picture-in-picture, logos, or B-roll overlays sit in front. HigherzIndexmeans visually in front within the selected plane and, while items overlap, the visually higher timeline lane; never rely on item-array order. Lane 0 is the top row. Sequential items that do not overlap must reuse the same compact lane—do not create a diagonal staircase or assign a new lane for every cut. Extra lanes are only for simultaneous layers. - Use
set_media_source_focusfor requests that move a subject inside an existing crop. Do not move the frame and do not use a broad state mutation for this common adjustment. - Use
add_media_keyframefor position, editable container width/height, scale, rotation, opacity, crop focus, source zoom, shape roundness, and either the legacy blur/brightness/saturation values or an orderedeffectssnapshot inside one already-isolated timeline item. Useadd_media_effect,update_media_effect, anddelete_media_effectfor the base Effects stack, selecting types fromlist_element_catalog. For a subject outline, addoutlineaftercolorKeyor another effect that creates transparency; its controls are width, edge simplification, color, opacity, and outline-only. A simple move or resize needs a start point and a destination point; the destination automatically holds, so do not add a duplicate terminal keyframe. Add further points only for further changes. For a discrete layout scene such as a two-way split, callapply_two_way_split_scene: it must split both sources at the scene start and end before changing the canvas containers. Transform only the middle segments, keep the tutorial audible, keep the presenter muted, and leave the before/after segments unchanged. Do not keyframe a full-duration item into another layout because its canvas selection bounds and unrelated copies can diverge. Do not escape to a separate Remotion workspace merely because a pasted prompt mentions TSX. - Use
update_media_itemfor the complete MediaPanel control surface: timeline/source trim, mute/volume, loop, playback speed, contain/cover, crop/focus, position, editable container size, rotation, scale, opacity/fades, roundness/shadow/border, visual effects, transition type and the sameanimationSpeedvalue shown in the UI,layerPlacement, lane, and z-order. Only pass fields the user asked to change. Useset_all_video_audiowhen a separate AudioPanel track is the master and all video items must be silent. - Use
trim_media_itemfor non-destructive source trimming, extending an agent-trimmed clip, changing playback speed while preserving source timing, or restoring the whole original file. PassrestoreFullSource: trueto expose the full source again. Never shorten or overwritemediaData.files[].duration: it is the original-file ceiling that lets a person extend the clip later. - For “replace clip A with clip B,” call
replace_media_item_sourcewith the exact target and source item IDs fromlist_editor_assets. This changes the targetfileIdatomically while preserving its timeline slot, framing, style, sound policy, lane, and z-order. When the new source is a completed Subclip AI operation that has not been imported yet, useimport_ai_operation_to_timelinewith its stable operation ID and the exact targetreplaceItemIdinstead; do not create a duplicate just to obtain a source item ID. These are checkpointed local edits, so an explicit replace request is sufficient authorization and must not be reported as blocked by a separate approval policy. Do not simulate replacement by renaming the item, copying trim metadata, or callingupdate_media_item, because that tool intentionally cannot change a source file. Re-read the target and inspect a frame inside its time range before claiming the replacement worked.
Media processing boundary
- In renderer React/TypeScript and web workers, use the installed
mediabunnypackage for metadata, demuxing, audio extraction, and WebCodecs-compatible processing. Do not add FFmpeg WASM. - In Electron main-process tools or explicit shell workflows, use native FFmpeg/FFprobe. Subclip prefers an authorized environment/system executable and falls back to its bundled native binary; this is never WASM. Call
get_media_runtimewhen diagnosing which runtime is active. - Do not install system software automatically. If no native executable or bundled fallback is available, report the concrete check and offer the platform command (on macOS,
brew install ffmpeg) for the user to run or approve. - Compatibility imports are queued one at a time, hardware-accelerated when available, cached, and capped to a 1920px proxy. In-app agents should rely on the host's terminal callback instead of polling or emitting repetitive chat updates. External clients can respect the returned
retryAfterMs. If the user stops or supersedes the work, callcancel_media_import.
Use normalized media coordinates: position.x/y use 0–1 and size.width/height are canvas fractions. Use fitMode: contain to show the full source and cover to fill a frame. Keep opacity within 0–1, scale around 1, and rotation in degrees.
For timing, maintain startTime < endTime and 0 <= sourceStartTime < sourceEndTime <= original file duration. Source duration is sourceEndTime - sourceStartTime; timeline duration is that source duration divided by playbackRate. Do not confuse timeline endTime with the source out point. Use split_timeline_item for cuts and delete_timeline_item for removal. After placement or transforms, inspect representative frames with view_current_frame. Correct framing defects and inspect again before reporting completion.
delete_timeline_item removes only a placed clip and deliberately keeps its source in MediaPanel. When the user explicitly asks to remove media from the project library as well, call list_editor_assets, identify the exact mediaFiles[].id values, then call delete_project_assets with those IDs and confirmed: true. That operation also removes every linked timeline placement. Do not imitate it with update_editor_state, do not guess from filenames, and re-list assets to verify both the file IDs and returned linked item IDs are absent.
For looping overlays, inspect at least one frame after the overlay source's original sourceEndTime, not only near time zero. A visible selection rectangle is not proof that the media pixels rendered.
Never replace an existing source destructively when adding an overlay or B-roll would satisfy the request. Prefer native, panel-editable media and canvas properties. Do not synthesize a coded background or HTML layer for an ordinary visual treatment; use canvas color plus native media/text layers so manual and agent editing remain interchangeable.
Large pasted prompts may describe a standalone Remotion source-code project. Inside Subclip, translate supported visual requirements into native editor layers and tools; do not imply that arbitrary TSX files, Remotion Studio, word alignment, or a new composition were created unless those artifacts actually exist. For ScreenStudio prompts, first identify which timeline item is the tutorial and which is the presenter, set a landscape canvas when requested, apply apply_screenstudio_layout, then inspect a composed frame.
Folder montage selection
When a folder supplies many source videos, selection is a visual evidence task—not a filename task.
- Inspect every relevant storyboard and its
video-context.json; do not stop after the first plausible file. - For lifting or workout requests, choose moments where the load, exertion, and action are clearly identifiable. Prefer the strongest readable action over a dark or merely adjacent moment.
- Reject near-black, obstructed, unreadable, duplicate, idle, transitional, or ambiguous samples. Storyboard extraction filters unusably dark and duplicate samples, but you must still judge the remaining pixels.
- Use exact manifest timestamps for source trims. If the source is incompatible with native import, call
import_attachment_clip_with_ffmpegwith that range; it retains the complete compatible source behind the native in/out points. - Inspect each chosen cut on the composed canvas. Replace any cut whose visible content does not match the requested action.
Perspective tilt
Use update_media_item with optional tiltX, tiltY, and tiltZ fields in degrees, each from -88 to +88. X tilts vertically, Y tilts horizontally, and Z rotates in the image plane. These static appearance controls preserve existing animation and are editable under Perspective tilt in the layer settings. Use small angles for legibility; never add a back face or substitute a 3D model. Set all three to 0 to reset. For text overlays use update_text_item with the exact itemId; update_caption_style changes project-wide captions.
Keyframes: use add_media_keyframe for animated tiltX, tiltY, tiltZ (-88..88 degrees) and scale (multiplier). These values interpolate with the keyframe easing, preserve omitted settings, and remain editable in the keyframe UI.
Tilt troubleshooting and scope
- Supply only finite numeric degrees for
tiltX(vertical),tiltY(horizontal), andtiltZ(in-plane), within -88..88. Never send NaN, Infinity, or unit-suffixed strings. - Reset with numeric zero on all three axes. Do not replace native layers with a 3D model.
- Use
add_media_keyframeon the exact existing item ID and absolute project time to animate tilt and scale. Omitted tilt inherits the previous keyframe or base style; missing base tilt is zero. Keep existing scale unless the user requests a change. - Changing base tilt alone will not override explicit tilt keyframes. Update the relevant keyframes instead. Older media keyframes need no recreation merely because they lack tilt fields; the sampler provides defaults.
- Distinguish saving settings from visually confirming the effect. Do not claim preview/export validation unless it was performed.
- Downloads
- 82All time
- Security audit
- Pass
- Last updated
- 2d ago
- Current version
- v1.0.0
- License
- MIT-0
