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.
Bring in the clips and find the best moments
For each big recording, the agent calls
start_upload, sends the bytes, then callsadd_mediawith theupload_id. It runsmediawithaudio.onsetsandaudio.contenton each clip's sequence URL: shots and kill sounds show up as hits with a strength, andaudio.contentlabels each span as speech, music, sound effects or silence. It runsvideo.sceneSplitto split a long stream into one file per scene, and looks at each moment withvideo.frames. Expected result: a sequence URL for each clip, and a list of moments with times.Pick the song and find the beats
The agent searches
stock_musicwithsearch_library, for example "hard trap" or "phonk". You pick from the previews. It runsaudio.beatson the song for the beats, andaudio.markersfor the drop and the phrases. Expected result: a list of beat times and the time of the drop.Cut on the beat
The agent makes a timeline with
new_timelineand a branch withtimeline_history. It places each moment withplace_media, then moves each cut onto a beat withtrim_clip. The best play goes on the drop. Expected result: every cut on a beat.Slow down the kills and freeze the frame
The agent uses
retimeon the big plays. Kindsectionwith aspeedbelow 1 slows the kill. Kindfreezeholds the frame atat_fforduration_fframes. 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.Add the effects and transitions
The agent adds transitions at the cuts with
add_transition, for exampleshake_zoom,glitchorflash. It adds effects to clips withadd_effect, for examplepixel_glitch,wigglefor camera shake, orbeat_rockfor color bursts. Expected result: the hits feel bigger.Add the callouts
The agent adds each callout with
add_texton the frame of the play, bold and centered, and pops it in withset_keyframesonopacity. For a hit sound under it, the agent runsfind_modelswith "impact sound effect" and reads its pick withget_model: apromptand adurationwithin the rangeget_modelgives. A good pick iselevenlabs_sfx. Your agent can search for others withfind_models. It callsgeneratewithdry_run: trueand tells you the price. For a price of 1 credit or more it waits for your yes. Then it callsgeneratewithmax_creditsset to that price and anidempotency_key. Expected result: a callout on each big play, and a sequence URL for the hit sound, which the agent reads withread.Check, then export
The agent runs
captureat each callout, a few cuts and the end, andcheck_timeline. It runsaudio.loudnesson the song and the game sound. Then it runsexportwithformatvideo. Expected result: an export card with statuscompleted.
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 ./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 theurlthatinvideo asset upload <edit-url>returns for each clip, a…/notebook/seq-N.MURL. Foraudio.beatsit is the song's, theurlthatinvideo asset addreturns.<id>is a stock result's id frominvideo library search.<page-url>is a notebook page of the project, listed byinvideo notebook show <project-url>.<price>is the dry run's.estimated_credits.<thread-url>is theurlthe paid run returns.<state_token>comes frominvideo edit show <edit-url>for the branch command.<branch-url>is the.branch_urlthatinvideo branch newreturns. Foredit change,<state_token>is read again withinvideo edit show <branch-url>.@ops.jsonreads a bare JSON list of ops, theoperationslist of the call below.<card-url>is.sequences[0]of the export result.invideo statuswaits but saves nothing.invideo notebook showsaves 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.
| Symptom | Fix |
|---|---|
get_model or generate refuses the model as not found | Models 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 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. |
invideo status --wait ends and the folder is empty | status does not download. Run invideo notebook show <card-url> --out <dir>. |
| The agent picked the wrong moments | Give it the times, or the words of the kill feed. It looks with video.frames and picks again. |
| Your in-game music hides the shots | audio.onsets hears the music too. Turn off game music when you record, or pick by frames. |
| The sound drops out in the slow motion | That is how retime works. Add a hit sound or a whoosh over that part. |
retime refused | The clip loops, and retime refuses looping clips. Make a slow-motion file with media video.changeSpeed instead. |
| A link download fails | Upload the file with start_upload, then add_media with the upload_id. |
| A clip has no sound | audio.onsets finds nothing. The agent picks the moments with video.frames only, and tells you. |
trim_clip refused as stale | The edge moved. Read with get_timeline and send the trim with the new from_f. |
| Too many effects | Ask for effects on the top plays only, and plain cuts between. |
| CLI exit 3 | The timeline changed since your read. Run invideo edit show and rebuild. |
Avoid: sending more cuts after a retime without a read | Instead: 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.