OpenAI Codex CLI is a terminal-based coding agent. It can inspect files, write code, run shell commands, and coordinate local tools. For video work, that means you can describe a video workflow in plain language and ask Codex to build and run the code that renders it.
The best approach depends on the video you want. For narrated explainers and product demonstrations, explainroo gives Codex a prepared workflow for writing narration, drawing scenes, synchronizing visuals, adding sound, checking the result, and exporting an MP4. It is free, open source under the MIT license, and designed for coding agents that can run shell commands.
For existing camera footage, FFmpeg lets Codex automate mechanical tasks such as transcoding and splitting clips. It can also batch-process files. Human review remains necessary even after a technically successful render. The crop may be bad or a cut awkward; an audio channel may be silent, and captions may cover important content. Codex CLI provides the coding-agent interface, while explainroo provides a focused path from a topic or product description to a finished explainer video.
What Codex CLI does in a video workflow
Codex runs video tools for you. Give Codex a request and files, and provide project instructions and command access. It writes or edits code, then runs the commands that produce the video.
A typical workflow has four layers:
- Planning: Codex turns your topic into a script, storyboard, or editing plan.
- Rendering: Code draws scenes, places media, or processes video frames.
- Assembly: FFmpeg or another renderer combines video, narration, music, and effects.
- Review: Codex renders still frames or checks technical properties, and leaves creative judgment to you.
FFmpeg is a command-line program for converting and combining media files. Codex can use it to convert formats, join clips, extract frames, or assemble an MP4. Reports on Codex and FFmpeg for social video editing recommend automating repeatable tasks while leaving editorial decisions to a person.
Codex also supports image inputs, so screenshots and design references can guide a video workflow. For repeatable jobs, the CLI supports non-interactive execution through codex exec, and project instructions can be stored in an AGENTS.md file. Approval modes control whether Codex asks before editing files or running commands, which matters when a workflow has network access or handles files outside the project directory.
The simplest route: use explainroo with Codex
explainroo is the strongest choice when your goal is a narrated explainer, tutorial, or product demo. Instead of assembling a video stack from separate scripts, you ask Codex to use the explainroo repository and follow its instructions.
Paste this prompt into Codex, replacing the brackets with your topic:
Make me a short explainer video about [your topic]. Use explainroo for it: clone https://github.com/vincentsch/explainroo, read its AGENTS.md and follow the steps.
Codex sets up explainroo, creates the video, checks the generated output, and gives you an MP4 file. The finished file is saved under:
videos/<name>/out/video.mp4
The workflow runs locally on your computer. explainroo works with Codex, Claude Code, Pi, OpenCode, Gemini CLI, and other coding agents that can run shell commands. It works best with Claude Code and Opus, but Codex is a supported use case.
Install the local dependencies
You need a current Node.js release, FFmpeg, and Chrome or Chromium. The first setup downloads the voice and timing models. A graphics card is not required.
Clone the repository and run its setup commands:
git clone https://github.com/vincentsch/explainroo.git
cd explainroo
npm install
node bin/explainroo.js doctor --fetch
explainroo is developed on Linux, and its tests run on Linux, macOS, and Windows. If the doctor command reports a missing dependency, install that dependency before asking Codex to render the video.
The explainroo documentation and source repository provide the project-specific instructions that Codex follows.
How explainroo turns a prompt into a video
explainroo keeps the spoken script and scene instructions in separate files. Codex writes two main files:
script.mdcontains the narrator’s spoken words.scenes.jscontains JavaScript that draws each scene.
You can tie a scene to a word in the script, so the video changes when the narrator mentions a concept rather than only at fixed time intervals.
Kokoro, an open voice model, reads the script aloud. explainroo includes English voices with American and British options, and the built-in narration requires no account or API key. Narration is in English and seven other languages.
Whisper analyzes the recorded narration and marks when each word is spoken. explainroo uses those timings to show pictures and animations at the right moments. Chrome runs in the background and draws each frame on an HTML canvas, a browser surface that renders graphics from code. Rough.js draws lines that look hand-drawn, and Lucide provides icons. Scenes can also include charts, code, and your screenshots.
explainroo generates background music for each video, adds small sound effects, and lowers the music while narration plays. FFmpeg then combines the rendered frames, voice, music, and effects into an MP4.
Codex can revise specific files: it edits script.md when the explanation is too long and scenes.js when a diagram is confusing; for layout problems, it uses the generated checks to find what to change.
Make a product demo from code or a website
explainroo also supports product demonstrations. Tell Codex which product to demonstrate and where to find its code or website. Codex rebuilds the product screens with matching colors, fonts, and button labels. A mouse pointer clicks through the screens and types in fields as the narration explains each step.
A useful request gives Codex three pieces of information:
- Product name
- The local code path or website address
- The user journey the video should demonstrate
For example:
Make a short product demo for [product name]. Use explainroo for it: clone https://github.com/vincentsch/explainroo, read its AGENTS.md and follow the steps. Use [code path or website] as the product reference. Show a new user completing [specific task].
Describe one clear journey rather than asking for every feature. A focused flow gives the narration, pointer movement, and screen changes a natural order. Review the rebuilt screens carefully because visual similarity depends on the reference material Codex can access and the instructions you provide.
Choose the format and visual style
explainroo supports four output shapes:
- Wide: YouTube video
- Tall: Video for YouTube Shorts, TikTok, and Instagram Reels
- Feed: Posts for Instagram and LinkedIn
- Square: Video
Tall, 4:5, and square videos receive captions that light up word by word. The tall format also keeps text away from the areas where social platforms place interface buttons.
You can choose one of six built-in visual styles in video.json:
- Paper
- Clean
- Chalk
- Blueprint
- Midnight
- Editorial
The pace setting in video.json controls narration speed, pauses, and animation timing. Change pace after reviewing the script, because faster narration also changes how long viewers have to absorb diagrams and labels.
In your first request, specify the audience, format, visual style, and topic:
Make a short 9:16 explainer for beginners about [topic]. Use the clean look, keep the wording concrete, and use captions that stay clear of platform controls.
Codex can then translate those requirements into explainroo’s project files.
Review the output before publishing
Codex cannot watch a video in the same way a person does. explainroo compensates with several checks:
- Still images from each scene
- A contact sheet containing small frames from the video
- A layout check for cut-off or overlapping text
- A speech check for words the voice mispronounced
Start with the contact sheet. It helps you spot pacing problems, repeated visuals, empty scenes, and abrupt style changes. Then inspect individual frames where text looks crowded or a diagram carries important information.
Listen to the MP4 yourself. Automated checks can detect layout and speech issues, but they do not decide whether the opening earns attention, whether the explanation feels natural, or whether the brand tone fits. A video can pass every technical check and still have an unhelpful hook, a confusing sequence, or an awkward pause.
Ask Codex for targeted revisions rather than a complete rewrite:
Review the explainroo checks and revise the video:
- shorten the introduction
- make the diagram in the second scene larger
- correct any words flagged by the speech check
- keep the same visual style and output format
This keeps the parts that already work and limits the next revision to specific changes.
Use Codex for existing footage and batch jobs
explainroo is for generated explainers and product demos. Its scope excludes editing existing camera footage, creating talking avatars, and generating live-action video, and it has no drag-and-drop editor. You describe the desired change to your coding agent, and the agent modifies the project files.
For existing footage, Codex can automate operations such as:
- Changing media to a required format
- Extracting thumbnails or frames
- Splitting clips at specified timestamps
- Joining compatible clips
- Applying the same transformation to many files
FFmpeg is well suited to those repeatable operations. Preserve the FFmpeg build used for each run and review copied commands before executing them. Unreviewed forks and abandoned wrappers introduce unnecessary risk, especially when a command can overwrite files or access a broad directory.
A split at a valid timestamp does not guarantee a good edit. It can break a sentence, remove a reaction, or create an unnatural transition. Unnecessary transcoding can also duplicate or drop frames, while aggressive compression damages text, faces, and product details. Use Codex to reduce repetitive work, then inspect the actual output.
Save the input and output rules in a project directory for recurring batch jobs. After testing the interactive workflow, use codex exec. Record the FFmpeg version with each run so later renders use the same environment.
Control Codex access while it works
Video generation creates files and automates a browser. It also renders video locally and sometimes accesses the network. Start with an approval mode that asks before running important commands. Check the working directory and output path before giving Codex broader permissions.
Full-auto mode lets Codex read files and run commands with network access. Use it only for tasks you understand and trust. Do not give it access to directories with secrets or unrelated personal files.
An AGENTS.md file can define project-specific instructions, such as where outputs belong, which commands are allowed, and which files Codex should preserve. explainroo already includes its own agent instructions, which is why the setup prompt tells Codex to read AGENTS.md before proceeding.
What to expect from the final result
explainroo produces animated, narrated explainers and interface demonstrations. It is a good fit for:
- Feature explanations
- Technical tutorials
- Product walkthroughs
- Short educational videos
- Social videos made with diagrams, code, charts, or screenshots
Optional AI illustrations are available through OpenRouter and are paid per image. Everything else in explainroo costs nothing per video with built-in voices. The coding agent itself is a separate service with its own pricing.
The main tradeoff is how you edit. A coding-agent workflow gives you scripts and scene code to edit, but no visual timeline for dragging clips into place. To change the video, describe what you want and have Codex edit script.md, scenes.js, or the relevant configuration. Keep revising until the narration, timing, layout, and visual emphasis work together.