Aident AI

How to Turn a Long Video Into 5 Shorts With Codex and FFmpeg
You do not need OpusClip to turn a long video into strong short-form clips. The default Aident workflow uses the harness model as the editor: it reads a trustworthy transcript, covers the whole source, ranks complete moments with evidence, repairs clip boundaries, and writes an edit decision list. FFmpeg then performs deterministic cuts, vertical reframing, caption burn-in, audio normalization, and export.
The default batch is three to five highlights. That range is large enough to test distinct ideas without flooding the review queue. If fewer than three moments pass the quality gates, return fewer. Never pad a batch with weak or misleading clips.
We tested this workflow on an authorized 23:57 talk by Harrison Chase, co-founder and CEO of LangChain. The result was five 1080x1920 clips, each 32 to 57 seconds long, rendered through the native lane with no OpusClip project.
The Five Clips From the Test Run
The source was Sonya Huang's post of the Sequoia talk Own Your Intelligence. The experiment asked whether direct, source-native technical claims would make stronger openings than broad event framing.
Rank | Highlight | Source range | Final duration | Selection score |
|---|---|---|---|---|
1 | Your model may not be the problem | 13:11.200-13:43.400 | 32.30s | 9.4 |
2 | When to customize the harness | 06:37.720-07:34.480 | 56.84s | 9.1 |
3 | They “Codexified” their agent | 19:59.600-20:42.840 | 43.36s | 9.0 |
4 | The agent improvement flywheel | 14:39.320-15:15.640 | 36.48s | 8.8 |
5 | An agent is three things | 01:07.620-01:24.800 and 02:07.540-02:23.840 | 33.52s | 8.6 |
One alternate passed the basic editorial gate but was not rendered. It overlapped another theme and would have expanded the batch beyond five. That is a useful constraint: more output is not automatically more learning.
Start With an Experiment, Not “Make This Viral”
“Viral” is an objective, not an outcome an agent can promise. Before touching the media, define a contract a reviewer can accept or reject.
Decision | Example rule |
|---|---|
Rights | The user owns the source or has permission to repurpose it |
Audience | General AI and technology audience |
Learning question | Do direct technical claims outperform broad framing? |
Batch | Three to five distinct highlights by default |
Length | 30 to 60 seconds |
Format | 1080x1920, square pixels, captions inside safe regions |
Review | Proxy review plus a final human watch-and-listen pass |
Publish boundary | Stop at local exports; no scheduling or publishing |
Measurement | Compare equivalent 24-hour and 72-hour windows after publication |
Keep distribution separate from editing. A request to create clips authorizes selection and rendering within the approved source boundary. It does not authorize posting those clips to X, LinkedIn, YouTube, Instagram, TikTok, or any other account.
Use the Harness Model as the Editor
The harness should own the judgment calls. A provider score can be a signal, but it is not a substitute for reading the source and explaining why a moment works.
1. Inspect the source
Record duration, dimensions, frame rate, audio streams, transcript availability, and source-quality limits before expensive processing. The test source was 1920x1080 H.264 video with stereo AAC audio at 29.97 fps and a 1:1 sample aspect ratio.
For private media, stay local unless the user explicitly approves an upload. Technical accessibility is not permission to repurpose a recording.
2. Build a trustworthy transcript
Use word-level timestamps when possible. Correct names, numbers, brands, acronyms, and negations against the source. In this run, local Whisper transcription was corrected for terms including LangChain, Claude Code, Codex, OpenAI, Anthropic, and swyx. The open-source Whisper repository documents the underlying speech-recognition model and local installation path.
Keep timestamps source-absolute until selections are approved. After a multi-range recut, rebase every word and caption timestamp to the final timeline.
3. Cover the whole source before ranking
Do not ask one giant prompt to “find the best clips.” That can bias selection toward the beginning of a long transcript.
Instead:
Divide the transcript into overlapping windows that end on transcript-segment boundaries.
Run a lightweight scoring pass across every window.
Shortlist the strongest windows.
Run detailed moment selection only inside that shortlist.
Remove near-duplicates, rank by evidence, and present survivors in source order.
This pattern comes from a non-UI audit of OpenShorts at pinned commit ad8ab590. The audit adopted source coverage, timestamp repair, scene-aware composition, caption timing, and delivery checks. It excluded the UI, dashboard, authentication, billing, deployment, and commercially licensed cloud implementation.
4. Score moments with evidence
Reject a candidate when it is incomplete, misleading without context, rights-sensitive, factually unsafe, or dependent on unseen setup. Score survivors for:
a truthful opening that makes sense quickly;
a complete standalone idea;
specific stakes for the target audience;
rising interest and a clear payoff;
visual potential and caption readability;
context integrity and low factual risk;
distinctness from the rest of the batch.
Repair the proposed start and end to complete words, nearby sentence boundaries, or natural silence. Preserve extra source handles until the final boundary check so a cut can be repaired without downloading or decoding the source again.
Write the Edit Decision List Before Rendering
Each selected clip needs an explicit plan:
source ranges and final-timeline offsets;
one-sentence promise and truthful on-screen hook;
minimum context required to preserve meaning;
layout per scene, not one crop forced across the whole clip;
caption cards, safe regions, and display intervals;
audio cleanup and a conservative loudness target;
destination variants and publication status.
Use a small layout vocabulary: portrait pass-through, tracked speaker, wide-content preservation, screen-plus-speaker, two-person split, or multi-person panel. Preserve slides, code, product UI, or group context when that information matters more than a close speaker crop. Reset tracking at hard cuts instead of panning between unrelated shots.
For this batch, slide scenes used wide-content preservation and talking-head scenes used stable portrait crops. One clip joined two chronological source ranges to remove an unrelated aside. The edit was disclosed and did not reorder or change the speaker's argument.
Render With FFmpeg by Default
FFmpeg is a strong default because it is deterministic, stateless, local, and precise. It can express exact cuts, multi-range assembly, scale and crop operations, caption burn-in, metadata removal, audio normalization, and delivery encoding. The official FFmpeg filter documentation covers its crop, scale, subtitles, silence, black-frame, and EBU R128 loudness tools.
A good native render should verify the decoded output, not only the container settings:
1080x1920 vertical frame;
H.264 video and AAC audio;
expected frame rate and duration;
sample aspect ratio exactly 1:1;
display aspect ratio 9:16;
no unintended black frames or long silence;
conservative integrated loudness and true-peak headroom.
All five test exports decoded successfully. Integrated loudness ranged from -16.1 to -16.5 LUFS, and measured true peaks remained below 0 dBTP.
What If the Harness Cannot Review Video?
Rendering capability and review capability are different. Being able to call FFmpeg does not mean the harness watched the result.
Use the strongest review mode the environment actually supports:
Review mode | Evidence | Artifact status |
|---|---|---|
Full audiovisual review | The harness inspects temporal video and assesses rendered audio semantically |
|
Proxy review | Transcript, labeled frames, contact sheets, final-audio re-transcription, and deterministic media checks |
|
Technical-only review | Decode, streams, duration, dimensions, aspect ratio, loudness, silence, and black-frame checks only |
|
The Harrison Chase batch used proxy review. The harness inspected opening, middle, ending, scene-change, and caption-transition frames; compared captions with the corrected transcript; re-transcribed each rendered export; checked first and last words for clipped boundaries or next-speaker leakage; and ran full decode, stream, aspect-ratio, loudness, peak, silence, and black-frame checks.
That evidence supports rendered_proxy_reviewed, not approved_for_publish. A human still needs to watch the exact five exports at normal speed and confirm motion smoothness, subjective speech quality, lip-sync, caption comfort on a phone, and brand fit. Unsupported checks must remain unresolved instead of being silently converted into passes.
Use Other Tools Only When the Job Requires Them
Lane | Use it when | Important boundary |
|---|---|---|
Native model plus FFmpeg | The media is locally accessible and the edit can be expressed as deterministic cuts, crops, captions, and audio work | Default lane |
HyperFrames | The clip needs designed overlays, custom HTML composition, or brand motion | It is a renderer, not an automatic selector |
Remotion | An existing React and TypeScript motion system already expresses the template well | Preview and verify the actual render |
ChatCut | A persistent collaborative timeline or human editor link is part of the deliverable | Current Loadout access requires user OAuth; there is no stateless platform-key path |
OpusClip | Native and composition lanes cannot meet the source or delivery need, and the user accepts provider-generated candidates | Last fallback; verify live API access and review every returned candidate |
OpusClip can still be useful when a managed provider workflow is the right tradeoff. Its API overview documents project, clip, transcript, and webhook surfaces. But the provider's virality score is not independent proof, and project creation uploads the source to an external service.
For richer caption composition, see How to Add Bilingual Captions With ChatCut and Codex. For deterministic subtitle burn-in, read How to Burn SRT Subtitles Into Video With Codex and FFmpeg. For designed motion systems, use How to Edit Videos With Claude Code and HyperFrames.
Run the Viral Clip Growth Loop
Give your agent the canonical setup instruction, then name the exact Skill revision:
Success is not “the model returned five files.” Success is a rights-cleared source, three to five evidence-ranked highlights when enough quality moments exist, deterministic exports, an honest review state, and a closed publication gate.
Set up Aident Loadout and run the exact Viral Clip Growth Loop revision on one approved source.
Sources
Viral Clip Growth Loop artifact revision 1, inspected in Aident Loadout on August 29, 2026



The one tool
for every tool
your agent needs.
Give any AI agent real capabilities in seconds. Connect 27,000+ tools once, skip the setup headache, and let your agents execute.
