|Docs

Make a gaming montage from your clips

You get a gaming montage, also called a highlight reel, frag movie or edit, from your own clips. Your best kills, clutches and funny moments are cut on the beat of a song. The big plays get slow motion, a freeze frame, a shake or a glitch, and a text callout like "ACE" or "1v4 CLUTCH".

Use invideo for this when you have long recordings and no time to scrub them: your agent finds the loud moments, cuts them on the beat, and you can still move any clip after on the timeline.

Quickest path

Set up your agent first with invideo for AI agents. Then give it this prompt.

Make a Valorant montage from my clips in ./clips. Find the kills andthe clutch moments, cut them on the beat of a hard trap song, slow downeach final kill, add a shake on the big hits and "ACE" when I get one.16:9 for YouTube. Show me the moments you picked before you cut.

In a chat app, you drag your clips into the project's Media panel in invideo. In a terminal, you name the folder and the agent uploads it.

What you need

Short clips are faster to read than a whole stream, but both work.

  • Your clips. MP4 or MOV from OBS Studio, the Xbox Game Bar, ShadowPlay, a console capture, or a Twitch download.
  • The game sound. Keep it in the recording. The agent finds the action by its sound.
  • The song. A track from stock music, or your own file if you have the rights. Copyrighted songs can get the video muted on YouTube or TikTok.
  • The callouts. The words to show: "ACE", "CLUTCH", your name, your channel.
  • The shape. 16:9 for YouTube, 9:16 for TikTok and Shorts.

Steps

Your agent edits on a branch and tells you what changed at each step.

  1. Bring in the clips and find the best moments

    For each big recording, the agent calls start_upload, sends the bytes, then calls add_media with the upload_id. It runs media with audio.onsets and audio.content on each clip's sequence URL: shots and kill sounds show up as hits with a strength, and audio.content labels each span as speech, music, sound effects or silence. It runs video.sceneSplit to split a long stream into one file per scene, and looks at each moment with video.frames. Expected result: a sequence URL for each clip, and a list of moments with times.

  2. Pick the song and find the beats

    The agent searches stock_music with search_library, for example "hard trap" or "phonk". You pick from the previews. It runs audio.beats on the song for the beats, and audio.markers for the drop and the phrases. Expected result: a list of beat times and the time of the drop.

  3. Cut on the beat

    The agent makes a timeline with new_timeline and a branch with timeline_history. It places each moment with place_media, then moves each cut onto a beat with trim_clip. The best play goes on the drop. Expected result: every cut on a beat.

  4. Slow down the kills and freeze the frame

    The agent uses retime on the big plays. Kind section with a speed below 1 slows the kill. Kind freeze holds the frame at at_f for duration_f frames. While the speed is changed, that part of the clip's sound is silent, so the agent adds a hit sound over it. Expected result: slow motion and freeze frames on the plays you asked for.

  5. Add the effects and transitions

    The agent adds transitions at the cuts with add_transition, for example shake_zoom, glitch or flash. It adds effects to clips with add_effect, for example pixel_glitch, wiggle for camera shake, or beat_rock for color bursts. Expected result: the hits feel bigger.

  6. Add the callouts

    The agent adds each callout with add_text on the frame of the play, bold and centered, and pops it in with set_keyframes on opacity. For a hit sound under it, the agent runs find_models with "impact sound effect" and reads its pick with get_model: a prompt and a duration within the range get_model gives. A good pick is elevenlabs_sfx. Your agent can search for others with find_models. It calls generate with dry_run: true and tells you the price. For a price of 1 credit or more it waits for your yes. Then it calls generate with max_credits set to that price and an idempotency_key. Expected result: a callout on each big play, and a sequence URL for the hit sound, which the agent reads with read.

  7. Check, then export

    The agent runs capture at each callout, a few cuts and the end, and check_timeline. It runs audio.loudness on the song and the game sound. Then it runs export with format video. Expected result: an export card with status completed.

The same job from a terminal:

invideo project new --title "Valorant montage"invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo edit new <project-url> --name "Montage v1" --fps 60invideo asset upload <edit-url> ./clips/*.mp4invideo media audio.onsets <sequence-url>invideo media audio.content <sequence-url>invideo media video.frames <sequence-url> --at 61,62,63 --out ./lookinvideo library search <project-url> --library stock_music \  --query "hard trap"invideo asset add <edit-url> --stock <id>invideo media audio.beats <sequence-url>invideo gen models <project-url> --query "impact sound effect"invideo gen model <project-url> --model elevenlabs_sfxinvideo gen run <page-url> --model elevenlabs_sfx --dry-run \  -i prompt="deep bass impact hit" -i duration=3invideo gen run <page-url> --model elevenlabs_sfx --max-credits <price> \  --idempotency-key hit-1 -i prompt="deep bass impact hit" -i duration=3invideo status <thread-url> --waitinvideo edit show <edit-url> --jsoninvideo branch new <edit-url> --name montage-v1 --token <state_token>invideo edit show <branch-url> --jsoninvideo edit change <branch-url> --timeline T1 \  --token <state_token> --operations @ops.jsoninvideo edit capture <branch-url> --at 4,12.5,30 --out ./framesinvideo edit check <branch-url>invideo edit export <branch-url> --format video --quality 1080 --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out ./out

Where each value comes from:

  • <name> is the name you choose in invideo agent register. INVIDEO_AS passes it to every later command.
  • <project-url> comes from invideo project new, and <edit-url> from invideo edit new.
  • <sequence-url> is the url that invideo asset upload <edit-url> returns for each clip, a …/notebook/seq-N.M URL. For audio.beats it is the song's, the url that invideo asset add returns.
  • <id> is a stock result's id from invideo library search.
  • <page-url> is a notebook page of the project, listed by invideo notebook show <project-url>. <price> is the dry run's .estimated_credits. <thread-url> is the url the paid run returns.
  • <state_token> comes from invideo edit show <edit-url> for the branch command. <branch-url> is the .branch_url that invideo branch new returns. For edit change, <state_token> is read again with invideo edit show <branch-url>.
  • @ops.json reads a bare JSON list of ops, the operations list of the call below.
  • <card-url> is .sequences[0] of the export result. invideo status waits but saves nothing. invideo notebook show saves the video as ./out/export.mp4, and the agent renames it.

The key MCP call slows a kill, freezes the last frame, adds a shake at the next cut and the callout. This is the full call. <branch-url> is the branch URL that timeline_history returns, and <state_token> comes from get_timeline on it. c4 and c5 are clip ids from get_timeline. At 60 fps, the kill runs from frame 720 to frame 780.

{  "url": "<branch-url>",  "timeline_id": "T1",  "expected_state_token": "<state_token>",  "operations": [    { "op": "retime", "clip": "c4", "kind": "section",      "from_f": 720, "to_f": 780, "speed": 0.4 },    { "op": "retime", "clip": "c4", "kind": "freeze",      "at_f": 870, "duration_f": 30 },    { "op": "add_transition", "left_clip": "c4", "right_clip": "c5",      "type": "shake_zoom", "in_f": 6, "out_f": 6 },    { "op": "add_text", "track": "V2", "start_f": 870, "end_f": 930,      "text": "ACE",      "style": { "font_size": 160, "font_weight": 800,                 "align": "center", "stroke": true } }  ]}

A retime changes the clip's length, and later clips move. The agent reads the timeline again with get_timeline before it adds more cuts after it.

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.

  • Costs credits: a paid stock song and any sound effect from elevenlabs_sfx.
  • Tool ops: audio.onsets, audio.content, audio.beats, audio.markers, audio.loudness, video.sceneSplit, video.frames. The dry run shows its price before anything starts.
  • Free: uploads, the cuts, retime, the effects, the callouts and the export.

A montage from a folder of short clips takes the agent a few minutes. A long stream takes longer to read. See Credits and what they cost for prices.

If something goes wrong

Most problems come from clips with music under the game, or effects that hide the play.

SymptomFix
get_model or generate refuses the model as not foundModels retire. Run find_models with the job in words, use the best match, and tell the person which model you used.
Exit code 6, or status is heldA 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.
invideo status --wait ends and the folder is emptystatus does not download. Run invideo notebook show <card-url> --out <dir>.
The agent picked the wrong momentsGive it the times, or the words of the kill feed. It looks with video.frames and picks again.
Your in-game music hides the shotsaudio.onsets hears the music too. Turn off game music when you record, or pick by frames.
The sound drops out in the slow motionThat is how retime works. Add a hit sound or a whoosh over that part.
retime refusedThe clip loops, and retime refuses looping clips. Make a slow-motion file with media video.changeSpeed instead.
A link download failsUpload the file with start_upload, then add_media with the upload_id.
A clip has no soundaudio.onsets finds nothing. The agent picks the moments with video.frames only, and tells you.
trim_clip refused as staleThe edge moved. Read with get_timeline and send the trim with the new from_f.
Too many effectsAsk for effects on the top plays only, and plain cuts between.
CLI exit 3The timeline changed since your read. Run invideo edit show and rebuild.
Avoid: sending more cuts after a retime without a readInstead: read with get_timeline first. Later clips have moved.

Prompts to try

Each prompt is a real variation of the job.

Make a 9:16 Fortnite montage for TikTok from ./fortnite. Fast cuts onevery beat, a flash on each elimination, and my name at the end.
Cut a Minecraft build timelapse from my long recording: speed upthe building, keep the reveal at normal speed, calm music under it.
Find the five funniest moments in my Twitch VOD, where chat and Ilaugh the loudest, and make a short montage with meme callouts.

When to use something else

invideo does not record your game or download Twitch VODs. Record with OBS Studio or your console, and download VODs from your Twitch dashboard. Then bring the files in.

invideo has no face cam crop that follows you. Place your face cam by hand with set_position and set_zoom.