How to make a TV commercial with OpenAI Codex

Codex can take a streaming TV spot from a brand's website to a delivery file: with an ad-making MCP (Model Context Protocol) server connected, it renders the takes, runs the edit and mix with ffmpeg, and conforms the file to each platform's spec.

By Grace Kong·Updated ·5 min read

Build a broadcast-ready TV spot from your agent

TL;DR

  • Setup is two commands, codex mcp add and codex mcp login, plus ffmpeg on the machine. The default 60-second tool timeout is enough.

  • One request names the playbook, the folder, a spending cap and the stop point. A 30-second draft costs about $7 to $15 at 480p and $30 to $55 finished at 1080p.

  • Frame rate is the usual trap: the playbook renders at 24 fps and one major streaming app accepts only 23.98, 25 or 29.97, so conform the final to 23.976.

  • Mix to -24 LUFS. One network caps true peak at -6 dB, stricter than the playbook's -2 dB (specs checked Nov 30, 2026).

  • Codex keeps the edit list and a ledger of run IDs in the folder, so the 1080p pass rebuilds the same edit from the same takes.

Set up Hypesonic in Codex

Add https://www.hypesonic.com/mcp as a remote MCP server named hypesonic, sign in, and make sure ffmpeg is on the machine.

codex mcp add hypesonic --url https://www.hypesonic.com/mcp
codex mcp login hypesonic
[mcp_servers.hypesonic]
url = "https://www.hypesonic.com/mcp"
default_tools_approval_mode = "writes"
tool_timeout_sec = 120

Codex waits 60 seconds per tool call by default and 10 seconds for a server to start (Codex docs). Hypesonic's run_wait returns within 45 seconds, so the default works; a little headroom does no harm. The writes approval mode makes Codex ask before any tool that is not read-only, which covers every paid run. The playbook needs ffmpeg for the edit and the mix: run ffmpeg -version first. Setup for every agent: connect the Hypesonic MCP.

The exact request to type

Name the playbook, the length, the folder and the stop point.

Use Hypesonic's ctv-ads playbook. Brand: https://example.com.
One 30-second spot, 16:9. Work in ./spots/meal-kit-30.
Keep edit.txt (the edit list) and ledger.md (run IDs, prompts, references).
Stop after the 480p draft and show me. Spending cap for the whole job: $100.
After approval, finish at 1080p, conform to 23.976 fps for Roku, and run every check.

What Codex does, step by step

Hypesonic's ctv-ads playbook, compressed into ten steps.

  1. Learns the brand: site, offer, claims, colors, fonts, logo; watches the brand's own ads to set the bar.
  2. Picks one famous ad's shape to borrow (structure and pacing only) and names it.
  3. Writes timed shots: 8 to 11 for 30 seconds, adding up to exactly 30.0, about 2.5 spoken words a second, last shot at least 5 seconds for the end card.
  4. Casts each person with a plain casting photo and designs voices with at least 10 seconds of reference speech; at most 3 voices per video request.
  5. Quotes and drafts: the whole 30 seconds in one request at 480p with draft: true, so faces and rooms stay consistent. A 30-second draft runs about $7 to $15.
  6. Edits with ffmpeg from an edit list, one file per piece, then joins and counts frames.
  7. Builds the end card as an HTML page in the brand's real fonts, rendered and laid over the last shot, inside the middle 90% of the frame.
  8. Mixes with a continuous room-tone bed and masters to -24 LUFS, true peak at or below -2 dB.
  9. Checks length to the frame (720 frames for 30 seconds at 24 fps), transcribes every word against the script, and looks at a frame per shot.
  10. Stops for your approval, then remakes the same takes at 1080p (drafts can be finished for about a week) and rebuilds from the same edit list. The finish runs about $30 to $55.

What you get back

A delivery file plus everything needed to rebuild it.

  • meal-kit-30_1080p.mp4: 1920x1080, H.264, stereo AAC, exactly 30 seconds.
  • edit.txt and ledger.md, so a fix to one shot does not mean regenerating the rest.
  • The script, the inspiration it borrowed from, known flaws, and the cost from spend_get.

The same connection can book the finished spot on streaming TV through Hypesonic, billed from your credits or an invoice.

Delivery specs by platform

Check length, frame rate and loudness against the platforms you will buy.

PlatformLengthsFrame ratesLoudness
Roku6 to 92 s23.98, 25, 29.97Not stated
Disney+, Hulu5 to 90 s on the spec page23.98, 24, 25, 29.97, 30Not stated
Prime Video15, 30, 45, 60 s (US)23.976 recommended, 24, 25, 29.97Not stated
Paramount+, Pluto TV15 or 30 s23.98 to 30-24 LUFS plus or minus 2, never above -6 dB
NetflixPre-roll 10 to 30 s; mid-roll 10 to 75 s23.976 to 60-24 LKFS plus or minus 2, true peak at or below -2 dBFS
Peacock, Tubi (Universal Ads)15, 30, 60 s23.98, 24, 25, 30-24 LUFS plus or minus 2

Sources: Roku, Disney Campaign Manager, Amazon Ads, Paramount Ads Manager, Netflix Ads, Universal Ads, checked Nov 30, 2026.

A 24 fps master therefore fails Roku. Ask Codex to conform the final to 23.976 with ffmpeg and to re-count frames, since Universal Ads warns that a 30.5-second file can count as 31. Paramount's peak limit of -6 dB is stricter than the playbook's -2 dB, so set the limiter to -6 if Paramount is in the plan.

Where Codex is strong and weak for TV spots

The right tool for the finish; plan the idea wherever you like.

  • Strong: the edit, the mix and the checks run locally, so the spot arrives finished and verifiable.
  • Strong: the edit list and ledger make the 1080p pass a re-render, not a second edit.
  • Weak: you need ffmpeg and some patience with a terminal; the first run takes a while to learn.
  • Weak: reviewing a draft is easier on a TV than in an IDE; open the file on a big screen before you approve.

Questions

Can Codex make a video ad?

Yes, with an MCP server that generates video, such as Hypesonic. Codex can also run the ffmpeg edit and mix on your machine, which chat-only agents cannot.

What frame rate should a TV commercial be for streaming?

23.976 fps works on every major platform. Roku accepts only 23.98, 25 and 29.97, so a 24 fps file should be conformed first.

Why does the draft come at 480p?

So you can approve the idea for about $7 to $15 before paying $30 to $55 for 1080p. The approved takes are remade at 1080p from the same generation, within about a week.

How loud should a streaming TV ad be?

Mix to -24 LUFS. Netflix caps true peak at -2 dBFS and Paramount at -6 dB, so use the stricter limit if you buy Paramount.

Sources

  1. 1OpenAI Codex docs, MCP · accessed Nov 30, 2026
  2. 2Roku Ads Manager, video and audio specs · Sep 2025
  3. 3Disney Campaign Manager, tech specs for video ads · Sep 2026
  4. 4Amazon Ads, Prime Video ad specs · accessed Nov 30, 2026
  5. 5Paramount Ads Manager, tech specs · accessed Nov 30, 2026
  6. 6Netflix Ads, creative specs · accessed Nov 30, 2026
  7. 7Universal Ads, creative requirements · Oct 2026

Build a broadcast-ready TV spot from your agent

Keep reading