Video Editing Without a GUI: How an LLM-Driven AI Agent Turned 25GB of Raw Footage into a Finished Film via Code
How can AI edit video without any editing software? This article walks through a real experiment where an LLM-powered AI Agent and command-line tools transformed 25GB of raw 4K footage into a 2-minute-50-second promotional video — with no GUI involved. It covers the full pipeline: speech transcription, multi-agent shot selection, machine-readable editing decisions, and automated execution with ffmpeg, along with the methodology, benefits, and current limitations of this code-driven approach.
Editing Video with Code: A Complete LLM-Driven Pipeline with Zero GUI
A Video Production Experiment “No One Has Done Before”
In a traditional video production workflow, an editor faces dozens of raw clips, repeatedly dragging the timeline, adjusting in and out points, and discarding bad takes before finally assembling the final cut. The process is not only time-consuming but also heavily dependent on the editor’s experience and patience.
But what if we took a different approach: let the machine understand the video content and automatically handle selection and assembly, while humans only set goals and review the results? That’s the technical practice explored in this article — a real 4K promotional video produced entirely without ever opening a video editing application. Using only an LLM-driven AI coding agent and a command-line toolchain, the entire workflow was completed, from 25GB of raw footage to a 2-minute-50-second final cut.
This is not a “one-click video” vertical product, but an entirely new working paradigm: letting an AI Agent with code execution capabilities take over the video production pipeline.
1. Overall Architecture: When Video Editing Becomes a “Data Processing Task”
Breaking down the entire workflow, its essence is converting video editing — a non-linear task — into a linear pipeline that can be driven by code:
Raw video footage (25GB)→ Speech transcription (turn audio into searchable text with timestamps)→ Intelligent decision-making (select the best takes based on text content and quality rules)→ Instruction generation (output machine-readable editing decisions)→ Automated execution (use open-source video processing tools to cut and concatenate clips)→ Final video
Humans participate in only two steps in this chain: providing the initial instructions and reviewing the final video. Everything in between is handled automatically by the AI Agent.
Why “Code-Driven” Instead of “Editing Software”?
Traditional editing software offers a graphical interface — intuitive to operate but hard to automate. The advantages of a code-driven approach include:
- Repeatability: The same instructions can be applied to any batch of footage.
- Auditability: Every decision is traceable, and every cut point can be traced back to its justification.
- Scalability: Four scenes processed in parallel, each with independent decisions that don’t interfere with each other.
- Version control: Changing a single parameter regenerates a different version of the final cut.
2. The Raw Material: 25GB of “Unorganized” Footage
The footage in this experiment is typical of a dilemma almost every video creator faces:
| Item | Details |
|---|---|
| Number of scenes | 4 (opening introduction, feature demo, goal statement, vision outlook) |
| Number of clips | 17 independently recorded files |
| Total size | ~25GB |
| Video format | Log/flat profile commonly used by professional cameras (preserving high dynamic range) |
| Content state | Ungraded, unedited, containing multiple false starts and preparation gestures |
The key challenge: the footage contains a large amount of “junk takes” — opening small talk, mid-sentence pauses, repeated takes. The traditional approach is to manually preview and pick clips one by one; this time, all of it was handed over to AI.
3. Step One: One Prompt to Launch the Fully Automated Workflow
No complex parameter configuration, no switching between multiple applications. The initial input was just a natural language instruction, whose key points included:
- Transcription requirement: Run speech transcription on each footage file, generating text with timestamps.
- Decision rules: Each scene has multiple candidate takes; later takes are usually more relaxed and natural, and segments with the fewest filler words (like “um” and “uh”) are preferred.
- Special handling: The last scene has reshoot material; the opening has “warm-up talk” that needs to be cut.
- Output requirement: Generate a structured file (e.g., JSON format) that explicitly records which clip is used for each scene and which time range is used.
- Execution instruction: Directly call open-source video processing tools to perform cutting and concatenation, and do not stop midway until the final video is produced.
A key design point: this prompt contains no specific editing techniques. Instead, it quantifies the decision criteria (filler word count, pause length), allowing the AI to make judgments based on objective metrics.
4. Step Two: Speech Transcription — Tagging Every Frame with “Semantic Labels”
The hardest part of automating video editing is making the machine understand “what the person is saying.” This practice used a locally deployed speech recognition model, running on an M4 Max-class machine, to transcribe all 17 clips word by word.
Technical Highlights:
- Timestamp precision: Every word carries start and end times accurate to the millisecond, making subsequent “cutting by word” possible.
- Error tolerance: Misrecognized names during transcription (e.g., the speaker’s name transcribed as a homophone) do not affect the final result, because editing decisions rely on timestamps and pause patterns rather than perfectly accurate semantics.
- Compute cost: Transcribing 25GB of footage locally took roughly tens of minutes — an acceptable range for offline processing.
After transcription, the AI obtained a “semantic map” — what each sentence says, when it was said, and how long the pauses lasted, all at a glance.
5. Step Three: Intelligent Editing Decisions — Multi-Agent Collaboration to Pick the Best Takes
This is the most “intelligent” part of the entire pipeline. The system adopted a multi-agent collaboration architecture: a decision sub-agent was assigned to each of the four scenes, plus a verification agent for cross-checking.
Examples of Decision Rationale:
- Scene 1: One reshoot version was excluded due to a 5.8-second pause in the middle; another clip was selected because it had “zero filler words and a clean, crisp ending.”
- Scene 3: The selected clip’s in-point fell between a natural sentence pause, ensuring smooth audio after the cut.
- Global standard: After all clips were concatenated, the final video contained zero filler words (um, uh, er).
Core Structure of the Output File:
{"scene": "Scene 1","selected_clip": "C003","selection_reason": "Zero filler words, ending falls on a natural pause","in_point": "00:00:12.340","out_point": "00:01:45.210"}
This file is essentially an annotated editing decision list — every cut point has a documented justification, rather than the AI cutting “by feel.”
6. Step Four: Automated Execution — Precise Cutting and Concatenation via Command Line
With the editing decision file in hand, the final mechanical operations were handed to open-source video processing tools (such as ffmpeg):
- Segment cutting: Extract specified segments from the raw footage according to timestamps.
- Sequential concatenation: Join the cut segments in scene order.
- Output: Generate a 2-minute-50-second 4K rough cut.
The result at this point is still an ungraded “flat” video, but the entire video’s narrative structure, pacing, and shot selection are fully determined.
7. Methodology: What Makes This Pipeline Actually Work?
1. Objective Criteria Replace Subjective Aesthetics
AI cannot understand “it feels right,” but it can understand “zero filler words,” “pauses no longer than 3 seconds,” or “in-point at a natural sentence boundary.” The key to success in this practice was making the implicit standards of editing explicit as computable metrics.
2. Structured Intermediate Artifacts Are the Foundation of the Pipeline
Transcripts and editing decision files are machine-readable intermediate artifacts. They make every step in the pipeline inspectable, modifiable, and reusable. If you’re unhappy with a particular cut, you only need to adjust parameters in the decision file — no need to re-transcribe all the footage.
3. Multi-Agent Parallelism Improves Efficiency
Processing four scenes in parallel, plus a verification agent for cross-checking, significantly compressed the overall decision time. This “divide-and-conquer + verification” architecture has broad reference value for automating complex tasks.
4. Local Computation Ensures Privacy and Control
All transcription was done on local compute hardware, with no need to upload tens of gigabytes of video data to the cloud — avoiding both privacy risks and bandwidth bottlenecks.
8. Limitations and Outlook
While this experiment is exciting, its boundaries must be viewed objectively:
- Currently applicable scenarios: Single-speaker videos, talking-head content, and promotional films centered on verbal delivery. Multi-camera switching, complex transitions, and color grading still require additional human intervention.
- Missing color grading: The final cut is an ungraded “flat” video; color processing still needs to be done afterward via code or professional grading software.
- Limited depth of semantic understanding: The AI can recognize filler words like “um” and “uh,” but cannot yet understand subjective aesthetic standards like “whether this line was delivered with conviction.”
But the direction is clear: video editing is shifting from a “manual craft” to a “programmable data processing task.” As LLMs’ understanding of multimodal content continues to improve, we can expect more sophisticated automation in the future — AI that not only assembles a smooth narrative, but also automatically matches pacing, color tone, and music to the target audience.
Conclusion
The most striking aspect of this experiment is not that AI completed the editing, but that the human needed almost no video editing software experience at all. You only need to clearly describe your goal and provide sensible rules; the rest is left to code and models.
For developers, this represents a new programming paradigm: instead of writing business logic in an IDE, you use natural language to direct agents to call tools, orchestrate workflows, and generate content. Video production is just one of the first scenarios where this paradigm is landing.
