You Can Now Edit Videos with ChatGPT (Codex): The Setup Guide
OpenAI Codex can write, edit and render video code on your behalf using frameworks like Remotion and HyperFrames. This guide covers practical setup for each workflow, what Codex actually does versus what ChatGPT advises, licensing costs, and where human approval still matters.
- PUBLISHED
- READ
- 15 minutes
OpenAI’s Codex can now write, run and modify video code on your machine or in the cloud. It does not edit video the way Premiere or DaVinci Resolve does. Instead, it writes code that builds or manipulates video: React components in Remotion, HTML compositions in HyperFrames, FFmpeg commands for raw footage, or export scripts that hand off to a traditional editor. If you can describe what you want, Codex can write the code to produce it.
This guide covers what that actually looks like in practice, how to set each workflow up, what it costs, and where human review still matters.
What Codex is (and is not)
Codex is available across several surfaces, each suited to a different way of working:
Codex CLI is an open-source coding agent that runs in your terminal. You install it with npm install -g @openai/codex or curl -fsSL https://chatgpt.com/codex/install.sh | sh on Mac/Linux. It reads your local files, writes code, runs commands, and can operate inside a sandboxed workspace. It is Apache-2.0 licensed.
Codex in your IDE brings the same agent into VS Code, Cursor, or Windsurf as an extension. You get Codex within your existing editor workflow without switching to a terminal.
Codex App is a standalone desktop application. Run codex app or visit the Codex App page to launch it.
Codex Web (at chatgpt.com/codex) runs coding tasks on OpenAI’s infrastructure. You connect a GitHub repo, configure an environment, and Codex spins up a container to work on tasks while your computer sleeps. It creates pull requests from its changes.
ChatGPT itself supports file uploads and code execution in some modes. Available tools and file limits vary. That is different from giving an agent controlled access to a local video project, its dependencies and a repeatable render pipeline. This guide uses Codex for that project-based workflow, not a claim that ChatGPT has become a native timeline editor.
The distinction matters because a repeatable render needs the right runtime, media assets and dependencies. A local Codex workflow lets you install and manage those deliberately rather than relying on whichever tools a chat session happens to provide.
You authenticate Codex with your ChatGPT account. Codex is included across all ChatGPT plans, including Free and Go, with usage limits that vary by plan. You can also use an OpenAI API key, which has separate usage-based pricing.
Quick comparison: Remotion vs HyperFrames vs FFmpeg
| Remotion | HyperFrames | FFmpeg | |
|---|---|---|---|
| What it is | React framework for programmatic video | HTML/CSS to deterministic MP4 | Command-line media toolkit |
| Source format | JSX/TSX components | HTML with data-* timing attributes | Raw media files |
| Rendering engine | Chromium via Puppeteer | Chromium (seekable) | Native codecs |
| Best for | Data-driven templates, branded content, parametric video at scale | Agent-driven motion graphics, explainers, product videos | Trimming, concatenating, transcoding, subtitle burn-in |
| Codex integration | Strong. Remotion has agent skills and –yes flag for non-interactive scaffolding | Strong. Ships 21 agent skills for coding agents including Codex, Claude Code, Cursor and others | Moderate. Codex writes commands but FFmpeg itself has no agent mode |
| Licence | Free for individuals and teams up to 3. Company Licence required at 4+ people | Open source (HeyGen) | LGPL/GPL depending on build |
| Node.js version | 18 or newer | 22 or newer | N/A (native binary) |
| Existing footage | Embed via <Video> or <OffthreadVideo> components | Embed via <video> elements with data-* attributes | Native. This is what FFmpeg is built for |
Workflow 1: Remotion + Codex CLI
Remotion treats video as React components. Each “composition” defines a width, height, frame rate and duration. You write JSX that describes what appears at each frame. Codex can write those components for you.
Setup
You need Node.js 18+ and a Codex-authenticated terminal.
# Install Codex CLI
npm install -g @openai/codex
# Sign in (opens browser for ChatGPT auth)
codex
# Scaffold a Remotion project
npx create-video --yes --blank my-video
cd my-video
The --yes --blank flags skip the interactive prompts, which is what you want when an agent is driving. Remotion also offers starter templates: --hello-world, --audiogram, --tiktok, --music-visualization, --prompt-to-video and others.
Using Codex to build a composition
From inside the project directory (which is a git repo after scaffolding):
codex exec --sandbox workspace-write \
"Create a Remotion composition that shows a product name fading in over 2 seconds, holds for 3 seconds, then fades out. Use the default 1920x1080 at 30fps. The product name should come from an input prop called productName."
Codex can inspect the project, write and register a composition, then attempt a test render. Review its changes and output. The workspace-write sandbox normally restricts writes to configured writable locations; it is not a guarantee that the agent cannot read outside the project. Review approval, filesystem and network settings before using confidential material.
Rendering
# Preview in browser
npx remotion studio
# Render to MP4
npx remotion render src/index.ts MyComposition out/video.mp4
# Render a specific aspect ratio for social
npx remotion render src/index.ts MyComposition out/reel.mp4 \
--width 1080 --height 1920
Working with existing footage
Remotion can import video files using the <OffthreadVideo> component. You place video files in the public/ folder and reference them. Codex can write the component that composites your footage with titles, lower thirds, transitions or data overlays.
Example prompt:
"Import the video at public/interview.mp4. Add a lower-third title bar that slides in at frame 90, showing the name 'Sarah Chen, CTO' in white on a dark semi-transparent background. Export at 1920x1080 30fps."
Codex writes the React component. You review the code, preview in Remotion Studio, then render.
Remotion licence nuance
Remotion is free for individuals and companies of up to 3 people, with unlimited commercial use. Once your organisation has 4 or more people, you need a Company Licence. The “Automators” tier ($0.01 per render, $100/month minimum) covers batch and automated rendering. The “Creators” tier ($25/seat/month) covers manual video creation, including using AI agents. You do not need both, just the one that matches your use. Enterprise plans start at $500/month for advanced needs including custom terms, priority support and consulting.
Workflow 2: HyperFrames + Codex CLI
HyperFrames takes a different approach. Instead of React, you write HTML with special data-* attributes that declare timing, and the framework renders that HTML to deterministic MP4 using its own Chromium-based pipeline. It is open source, maintained by HeyGen, and built specifically for AI coding agents. It requires Node.js 22 or newer and FFmpeg.
Setup
# Install HyperFrames agent skills (works with Codex, Claude Code, Cursor, etc.)
npx skills add heygen-com/hyperframes
# Or install the core set non-interactively
npx hyperframes skills update
# Scaffold a new project
npx hyperframes init my-project
cd my-project
HyperFrames provides 21 agent skills that teach coding agents the full production loop: plan, write HTML, wire animations, add media, lint, preview, render. The skills work with Codex, Claude Code, Cursor, Gemini CLI and other coding agents that support skills. A “make me a product launch video” request routes differently from “add captions to this footage.”
Using Codex to build a composition
codex exec --sandbox workspace-write \
"Using HyperFrames, create a 15-second explainer video about password managers. Use three scenes: a problem statement with red tones, a solution reveal with a fade transition, and a call to action with the text 'Try it free'. Render at 1080x1920 for Instagram Reels."
HyperFrames compositions are HTML files. The framework uses data-start, data-duration, and similar attributes to control timing. Animations use GSAP (the default and recommended runtime), CSS keyframes with the seek-safe CSS adapter pattern, or other seekable animation libraries. The key constraint is that all animation must be seekable (the framework can jump to any frame) rather than event-driven.
Rendering
# Lint and validate the composition
npx hyperframes check
# Preview (opens browser with timeline)
npx hyperframes preview --background
# Render to MP4
npx hyperframes render --quality high --output out.mp4
# Draft quality for faster iteration
npx hyperframes render --quality draft --output draft.mp4
Working with existing footage
HyperFrames supports embedding video via standard HTML <video> elements with timing attributes. You can composite footage with designed overlays, lower thirds, captions and graphic elements. The /talking-head-recut workflow skill handles this specifically: you provide footage, and the agent writes HTML that layers graphic elements over it.
The /embedded-captions workflow handles adding styled captions to talking-head footage without altering the underlying video.
Workflow 3: FFmpeg + Codex CLI
FFmpeg is a command-line media toolkit. It can process footage and generate simple media from filters, but it is not a React or HTML composition framework. Use it for trims, concatenation, transcoding, subtitles, audio and format conversion.
Setup
# macOS
brew install ffmpeg
# Verify
ffmpeg -version
No project scaffolding needed. FFmpeg works directly on media files.
Common tasks via Codex
Instead of memorising FFmpeg flags, describe what you want:
codex exec "Write an FFmpeg command that trims input.mp4 from 00:01:30 to 00:04:00 with frame-accurate cutting, re-encoding with libx264 at CRF 23. Save as clip.mp4."
Codex writes and can execute:
ffmpeg -i input.mp4 -ss 00:01:30 -t 00:02:30 \
-c:v libx264 -crf 23 -preset medium \
-c:a aac -b:a 160k \
-movflags +faststart clip.mp4
Note: with transcoding and accurate seeking enabled (the default), input-side seeking can also be accurate: FFmpeg decodes and discards material between the seek point and the requested start. Stream-copy trimming has different keyframe constraints. This example uses output-side seeking and an explicit duration for clarity.
Other practical prompts:
- “Concatenate all .mp4 files in this folder in alphabetical order”
- “Burn the subtitles from captions.srt into video.mp4 with white text, black outline, positioned in the lower third”
- “Convert this 16:9 video to 9:16 for Reels, centre-cropping the frame”
- “Extract the audio track from interview.mp4 as a 192kbps MP3”
- “Add a 2-second fade-in and 2-second fade-out to this clip”
FFmpeg uses -c copy for operations that do not need re-encoding (fast but limited to keyframe boundaries) and re-encodes when you need frame accuracy, filters, or format changes. Codex picks the right approach based on your description.
Subtitle burn-in
ffmpeg -i input.mp4 -vf "subtitles=captions.srt:force_style='FontSize=24,FontName=Arial,PrimaryColour=&Hffffff,OutlineColour=&H000000,Outline=2'" -c:a copy output.mp4
This burns styled subtitles directly into the video. For soft subtitles (toggleable by the viewer), Codex writes the muxing command instead.
Transparent overlays with alpha
To render a lower third or title card with a transparent background for use in a traditional editor:
ffmpeg -i input.mov -c:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le \
-c:a pcm_s16le output.mov
The source must already contain transparency; this command does not remove an opaque background. Confirm that the source framework can export alpha and that your editor supports the chosen codec. The -profile:v 4444 flag selects ProRes 4444, which supports alpha channels. The -pix_fmt yuva444p10le flag preserves the alpha data. Not all FFmpeg builds include ProRes encoding; run ffmpeg -codecs | grep prores to check yours.
Workflow 4: Traditional editor handoff
Not everything needs to stay in code. A practical workflow combines code-based tools with a traditional editor:
- Codex + Remotion or HyperFrames generates title cards, animated lower thirds, data visualisations, or branded intro/outro sequences as individual video files or transparent overlays.
- Codex + FFmpeg trims raw footage, normalises audio levels, burns captions, and batch-converts formats.
- You import those rendered assets into Premiere, DaVinci Resolve, Final Cut or CapCut for final assembly, colour grading, and timing adjustments.
This is where code-based video genuinely saves time. Instead of manually animating a lower third in After Effects, you describe it to Codex, render it as a transparent WebM or ProRes 4444, and drop it onto your timeline. Need 50 variations with different names? Parametrise it.
Example prompt for batch rendering:
"Render this lower-third composition 50 times, once for each name in speakers.json. Output as ProRes 4444 with alpha channel. Name each file by the speaker's last name."
Remotion handles parametric batch rendering natively. HyperFrames compositions can be driven by variables and rendered in a batch via npx hyperframes render --batch rows.json --output "renders/{name}.mp4".
Assets, audio and captions
Audio
Both Remotion and HyperFrames support audio tracks. Remotion uses <Audio> components. HyperFrames uses <audio> elements with timing attributes. Neither framework generates audio. You provide music files, voiceover recordings, or sound effects as assets.
For background music, check the licence for the specific asset and intended commercial use. Artlist, Epidemic Sound and Pixabay each have their own terms. Royalty-free does not mean unrestricted, and an AI-generated workflow does not replace permission.
Captions and subtitles
Three approaches depending on your needs:
- FFmpeg subtitle burn-in: fastest for existing footage with an SRT file
- Remotion
@remotion/captions: generates timed caption overlays as part of a React composition, with styling control - HyperFrames
/embedded-captionsworkflow: designed for adding captions to talking-head footage with positioning behind the subject
For auto-generated captions, use a separate transcription tool (Whisper, Descript, or your platform’s auto-captions) to produce an SRT file first, then bring that into your chosen pipeline.
Export and aspect ratios
| Platform | Resolution | Aspect ratio |
|---|---|---|
| YouTube landscape | 1920 x 1080 | 16:9 |
| Instagram/TikTok Reels | 1080 x 1920 | 9:16 |
| Instagram feed square | 1080 x 1080 | 1:1 |
| LinkedIn video | 1920 x 1080 or 1080 x 1350 | 16:9 or 4:5 |
| Twitter/X video | 1920 x 1080 | 16:9 |
Set the composition dimensions in Remotion or HyperFrames and use the render options supported by the installed version. In FFmpeg, resizing and cropping are normally filter operations. Changing output dimensions does not automatically redesign text, crops or safe areas; review each aspect ratio separately.
Troubleshooting
Codex refuses to run a task: non-interactive execution normally expects a trusted Git repository. Initialise a dedicated project with git init, inspect codex exec --help, and check the actual error. Interactive CLI and non-interactive execution have different behaviour; a pseudo-terminal is not required for codex exec.
Codex sandbox or network errors: inspect the specific denied operation and the current approval, writable-directory and network settings. Install required dependencies yourself where appropriate, then retry the scoped task. Do not disable sandboxing or grant unrestricted access merely to make a render succeed.
Remotion render fails with Chromium errors: Remotion uses Puppeteer for rendering. On Linux servers, you may need to install Chromium dependencies (apt-get install -y libnss3 libatk-bridge2.0-0 and similar). On macOS, it generally works out of the box.
HyperFrames animations appear frozen: all animations must be seekable. If you use setTimeout, requestAnimationFrame with elapsed-time logic, or event-driven animation, HyperFrames cannot scrub to arbitrary frames. Use GSAP with a paused timeline (the recommended default), CSS keyframes via the framework’s CSS adapter (which manages animation-play-state and currentTime seeking), or the built-in timing attributes. Native CSS @keyframes without the adapter are not automatically seekable.
FFmpeg “codec not found”: your FFmpeg build may not include the codec you need. Run ffmpeg -codecs to check. On macOS, brew install ffmpeg includes most codecs. For ProRes output, use -c:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le.
HyperFrames Node.js version: HyperFrames CLI requires Node.js 22 or newer. If you see unexpected errors, check your Node version with node -v. Use nvm install 22 or nvm use 22 if you need to switch.
Permissions, privacy and human approval
Code-generated video does not bypass copyright. If Codex writes code that imports a copyrighted image, video clip, or music track, the copyright obligation is yours.
Codex CLI runs tools on your machine, but that does not mean project information stays there. Prompts, selected context, tool results and potentially image frames or transcripts can be sent to the model or other approved services. Treat uploads and network-enabled tools as separate data flows. Keep sensitive footage outside the workspace until you have checked your plan, settings, organisation policy and any external tools.
Codex Web runs in OpenAI’s infrastructure. Your repo code is checked out in their container. Media files committed to the repo would be present in that environment. Consider whether that aligns with your data handling requirements.
Always review before publishing. Codex writes code. That code renders video. But neither the code nor the video has been reviewed by a human until you do it. Check:
- Branding accuracy (colours, logos, fonts)
- Factual claims in any text overlays
- Audio sync and levels
- Licence compliance for all assets
- Accessibility (captions, contrast ratios)
Treat Codex output like a first draft from a junior editor. It accelerates the build, but final quality and accuracy are your responsibility.
Example prompts (not scripts)
These are starting points for Codex tasks. Adapt them to your project:
Remotion product demo:
“Create a Remotion composition that cycles through 5 product screenshots from the public/screenshots folder. Each screenshot should scale from 95% to 100% over 3 seconds with a subtle box shadow. Add a bottom bar with the product name from props. 1920×1080, 30fps, total 18 seconds.”
HyperFrames stat animation:
“Using HyperFrames, build a 6-second animation that counts up from 0 to 2,847 in the centre of the frame, with the label ‘Active Users’ underneath. Use a monospace font, dark background, green accent. Render at 1080×1080.”
FFmpeg batch processing:
“Write a bash script that loops through every .mov file in the current directory, transcodes each to H.264 MP4 at CRF 22 with AAC audio at 192k, and saves to an ‘output’ subfolder keeping the original filename.”
Editor handoff:
“Render the intro composition as ProRes 4444 with alpha channel at 1920×1080 30fps. I need a transparent background so I can layer this over footage in DaVinci Resolve.”
Frequently asked questions
Can ChatGPT edit my existing video files directly?
ChatGPT supports uploads and code execution in some modes, so limited media processing may be possible depending on the available environment. It does not automatically have access to your computer or provide a conventional editing timeline. Codex can work with an approved project and installed media tools; check and approve its outputs before use.
Do I need to know React to use Remotion?
It helps, but Codex can write the React code for you. You should be comfortable reading JSX to review what Codex produces. Remotion’s documentation is thorough if you want to learn.
Is HyperFrames free?
The HyperFrames project is open source. Check the repository licence and current terms before commercial use. AI-agent usage, hosting, paid assets and optional external services can still cost money.
Which workflow should I start with?
If you have existing footage to trim, caption or reformat, start with FFmpeg + Codex. If you want to create video from scratch with data-driven templates, Remotion is mature and well-documented. If you want agent-first video creation where the AI handles more of the production loop, HyperFrames is built for that.
Can I use Codex with a free ChatGPT account?
Yes. Codex is included across all ChatGPT plans, including Free and Go. Usage limits are lower on free plans. You can also use an OpenAI API key, which has separate usage-based pricing. Check chatgpt.com/pricing for current plan limits.
What about Sora or other AI video generators?
Tools like Sora generate video from text descriptions using diffusion models. That is a fundamentally different approach from what this guide covers. Codex + Remotion/HyperFrames/FFmpeg is code-based video: deterministic, reproducible, and version-controlled. Sora produces footage. These tools produce compositions, edits and renders.
Where to go from here
The fastest way to try this is to install Codex CLI, scaffold a Remotion project, and ask Codex to build a simple composition. Start with a short test to see whether the workflow suits how you think.
For a team, start with one repeatable use case, such as branded lower thirds or a weekly data update. Keep the approved design, source files, prompts and render instructions together. Add batch rendering only after the single-video workflow is reliable.
For more on building systems that connect AI tools into repeatable workflows, visit AI Systems Lab. If you want to see how ChatGPT can be used to build a marketing tool from a chat, that walkthrough covers the broader pattern of turning AI conversations into working systems.
Sources: OpenAI Codex CLI | Using Codex with your ChatGPT plan | Remotion Documentation | Remotion Licence and Pricing | HyperFrames GitHub | FFmpeg Documentation | Pixabay Content Licence