Make a trend edit like CapCut: slow-mo, meme, freeze frame
You get a vertical trend edit, the kind people make from a CapCut template: a velocity edit with speed ramps, slow-mo on the drop, a freeze frame with a caption, a quick reverse, meme text, and shake, flash or glitch transitions. Your agent times every move to the beat of the song.
Use invideo for this when you want the effect timed to the music without a template: your agent finds the drop in the song, ramps the speed there, and every move stays editable on the timeline after.
Quickest path
Set up your agent first with invideo for AI agents. Then give it this prompt.
Make a 15 second vertical velocity edit from ./skate.mp4 to the song./song.mp3. Ramp the speed down to slow-mo on the drop, freeze on thejump with the text "wait for it", then a shake zoom transition back tonormal speed. Keep text clear of the TikTok buttons. Show me frames.In a chat app, you drag your clip and song into the project's Media panel in invideo, then name them in the chat. In a terminal, you name the files and the agent uploads them.
What you need
A trend edit needs one strong clip and a song with a clear drop.
- Clips. MP4 or MOV from your phone. Clips shot at a high frame rate give smoother slow-mo.
- The song. Your own licensed file, or a track from stock music. Trending sounds from an app stay in that app.
- The moves. Slow-mo, speed ramp, freeze frame, reverse, meme text, shake or glitch.
- The text. The meme lines, top and bottom, or one caption.
- The shape. 9:16 for TikTok, Reels and Shorts.
Steps
Your agent edits on a branch and tells you what changed at each step.
Make a vertical timeline
The agent makes a project with
new_project, a 9:16 timeline withnew_timeline, and a branch withtimeline_history. Expected result: a vertical timeline URL on the new branch.Bring in the clip and the song
The agent uploads both with
start_uploadandadd_media, or adds a stock song fromstock_musicwithsearch_library. It places the clip withplace_mediaand fills the frame withfill_frame, and the song on its own audio track. Expected result: the clip and the song on the timeline.Find the drop
The agent runs
mediaaudio.markerson the song for its tempo and drops, andaudio.beatsfor the strong beats, and turns each time into a frame: seconds times the frame rate. Expected result: the frame of the drop, and the beats around it.Ramp the speed on the drop
The agent runs
retimewithkindramp on the clip, from normal speed down to slow-mo across the drop, withshapeease_in_out. Later clips move to make room. The clip's own sound goes silent while its speed is changed, so the song carries the sound. Expected result: the clip slows on the drop.Freeze and reverse
The agent runs
retimewithkindfreeze at the peak frame for a short hold, andkindreverse on a short range for the rewind moment. Expected result: the picture holds, then plays back.Add transitions, effects and text
At each cut, the agent adds a catalog transition with
add_transition, such asshake_zoom,flash,glitchorzoom. On the clip, it can add an effect withadd_effect, such aswigglefor camera shake orpixel_glitch. It adds meme text withadd_text, white with a black stroke, and safe zone guides withcreate_guide. Expected result: transitions on the beats and text inside the guides.Check and export
The agent runs
capturebefore, on and after the drop, at the freeze and at each text, andcheck_timeline, and looks for the drop on the slow-mo and text that reads on a phone. Then it runsexportwithformatvideo. In a terminal, it saves the file withinvideo notebook showon the card's URL. Expected result: an export card with statuscompleted.
The same job from a terminal:
invideo project new --title "Skate edit"invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo edit new <project-url> --name "Velocity" --width 1080 --height 1920invideo asset upload <edit-url> ./skate.mp4 ./song.mp3invideo media audio.markers <sequence-url>invideo media audio.beats <sequence-url>invideo edit catalog <edit-url> --ops retime,add_transition \ --transitions shake_zoom,flashinvideo edit show <edit-url>invideo edit change <edit-url> --timeline T1 --token <state_token> \ --operations @ops.jsoninvideo edit capture <edit-url> --at 4,6,7.5,9 --out ./framesinvideo edit export <edit-url> --format video --quality 1080 --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out ./outWhere each value comes from:
<name>is the name you choose ininvideo agent register.INVIDEO_ASpasses it to every later command.<project-url>comes frominvideo project new, and<edit-url>frominvideo edit new.<sequence-url>is the URLinvideo asset uploadreturns for the song.<state_token>comes frominvideo edit show.ops.jsonholds a bare list of operations, like theoperationslist in the call below.<card-url>is.sequences[0]of the export result.invideo statuswaits and saves nothing.invideo notebook showsaves the file as./out/export.mp4.
The key MCP call is the full call. It ramps to slow-mo on a drop at 6 seconds, freezes at the jump, and adds the meme text. At 30 fps, 6 seconds is frame 180. <branch-url> is the branch_url that timeline_history returns. The <state_token> and the clip id c1 come from get_timeline.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "retime", "clip": "c1", "kind": "ramp", "from_f": 165, "to_f": 195, "start_speed": 1, "end_speed": 0.25, "shape": "ease_in_out" }, { "op": "retime", "clip": "c1", "kind": "freeze", "at_f": 240, "duration_f": 30 }, { "op": "add_text", "track": "V2", "start_f": 240, "end_f": 270, "text": "wait for it", "style": { "font_size": 90, "color": "#ffffff", "stroke": true, "stroke_color": "#000000", "stroke_width": 6, "align": "center" } } ]}Each retime moves the frames after it. The agent reads the timeline again with get_timeline before it places transitions after a ramp.
Cost and time
Edits and exports are free. Generation and transcripts cost credits. Paid stock costs a small credit charge, or one of your workspace's iStock licenses. Your agent runs a dry run first and tells you the price before it spends anything.
- Free: every
retime, transitions, effects, text, guides and the export. - Tool ops:
audio.markersandaudio.beats. The dry run shows its price before anything starts. - Costs credits: a paid stock song. Your own song file costs nothing.
A trend edit takes the agent a few minutes. A few tries on the ramp timing are normal. See Credits and what they cost for prices.
If something goes wrong
Most problems are timing and sound after a speed change.
| Symptom | Fix |
|---|---|
| The clip goes silent after the ramp | That is how retime works. Put the song on its own audio track, or retime with kind reset to bring the sound back. |
| The slow-mo looks choppy | The clip has few frames a second. Use a clip shot at a higher frame rate, or a smaller slow-down. |
| The drop lands late | Each retime moves later frames. Read with get_timeline, then move the clip with move_clip. |
retime refused | Looping clips are refused. Place the clip again without the loop. |
add_transition refused | The two clips must touch on one track with no gap and no transition. |
| Meme text sits under the app buttons | Move it inside the guides with set_position, and capture again. |
Exit code 6, or status is held | A safety review, not a refusal. Wait, then run invideo status <url> --wait again. Do not resend. If it ends failed, change the input the review flagged. |
| CLI exit 3 | The timeline changed since your read. Run invideo edit show and rebuild the ops. |
| Avoid: guessing the drop by ear | Instead: read audio.markers and audio.beats and use their times. |
| Avoid: saying done without looking | Instead: capture before, on and after the drop. |
Prompts to try
Each prompt is a different trend.
Make a meme edit from ./cat.mp4: top text "me at 3 am", bottom text"one more episode", freeze on his face, then reverse the last second.Vertical.Make a 20 second velocity edit from my gym clips in ./gym to thissong. Speed up between beats, slow down on every fourth beat, and aflash transition on each slow-down.Make a glitch edit of my outfit clips in ./fits. A glitch transition onevery beat, pixel glitch on the drop, and my handle at the end.When to use something else
invideo does not open CapCut templates or use trending sounds from inside TikTok or Instagram. Make the edit here with your own or stock music, then post it and add the trending sound in the app if you want it.
invideo does not track a face to zoom on it. For a face-locked zoom, the agent keys the zoom by hand with add_keyframe_lane and add_keyframes, or you use an app with face tracking.