io.github.Daveyuwang/framx
by Daveyuwang
README.md
# framx
<!-- mcp-name: io.github.Daveyuwang/framx -->
[](https://github.com/Daveyuwang/framx/actions/workflows/ci.yml)
framx lets a coding agent such as Claude Code or Codex edit video on a Mac with Apple silicon. The agent decides what plays. framx shows it the material (a word-timed transcript, the shots, a track's beats), renders exactly the edit it writes, and checks the result before you see it. You review the clip word by word in the framx app, and framx keeps what you choose to remember for the next edit.

A real run in the framx app: Claude Code (Sonnet 5.5) cut a 45-second clip from a 3-minute webinar, already indexed, in 3 minutes 28 seconds, and the check passed. The webinar is made for the demo, two Mac voices over slides, so nothing in it belongs to anyone else.
- **Faster on long recordings, with fewer tokens.** On 8 editing briefs, Claude Code with framx finished faster on 7 (10 minutes against 26 on a 55-minute keynote) and used 42% fewer tokens than the same agent with ffmpeg and Whisper but no framx. Blind judges preferred the clips made without framx in the first two rounds, and framx's in 9 of 16 picks in each of the two rounds after its captions were redrawn.
- **A check that stops broken clips.** `check_video` caught all 32 defects planted in test clips, with no false alarm on 11 clean ones; its thresholds were set on these cases. On 12 edits of real recordings it said NOT READY for the 3 that held a real error in framx's transcript, and missed a fourth.
- **Speech recognition on the Mac.** 3.4% and 5.3% word error rate on two TED talks, and a 55-minute talk indexed in 112 seconds on an M5.
- **An agent can set it up alone.** DeepSeek Harness, given only [AGENT_SETUP.md](https://github.com/Daveyuwang/framx/blob/main/AGENT_SETUP.md), installed framx, registered it and delivered a clip the check called READY in about 6 minutes (one run).
```bash
uv tool install framx && framx init
```
Or tell your agent: *Set up framx by following https://github.com/Daveyuwang/framx/blob/main/AGENT_SETUP.md*
## Measured
| Question | Result | Report |
|---|---|---|
| Does an agent need framx? | Claude Code (Sonnet 5.5) on 8 editing briefs, in four rounds of the framx arm against the same runs without it. With framx: faster on 7 of 8 in the first round and 6 of 8 in the second, most of all on long recordings (10 vs 26 minutes on a 55-minute keynote); 42% fewer tokens; a caption left on screen past a cut once in three rounds, for 0.10 s, against 4 times without it; every spoken clip within 0.6 dB of -14 LUFS (without it, -13.9 to -16.4). Blind judges preferred the clips made without framx in the first two rounds (13 and 12 of 16 picks), mostly for their captions and layout, and found no steady difference in which passages were chosen. With captions drawn the way those judges preferred, framx's clips won 9 of 16 picks in each of the next two rounds. In the last round all 8 runs were handed over READY, and a check of the files alone still found problems in 2 of 8. | [AGENTS.md](https://github.com/Daveyuwang/framx/blob/main/eval/runs/AGENTS.md) |
| Can another agent set framx up by itself? | DeepSeek Harness (headless, a DeepSeek model), in an empty home folder and given only [AGENT_SETUP.md](https://github.com/Daveyuwang/framx/blob/main/AGENT_SETUP.md), installed framx, registered it (`framx init`), checked it (`framx doctor`) and, before framx's tools had loaded, delivered a 20-second vertical clip with captions that `framx check` called READY, through framx's commands, in about 6 minutes. Its next session had framx's 21 MCP tools. One run. | [AGENTS.md](https://github.com/Daveyuwang/framx/blob/main/eval/runs/AGENTS.md) |
| Does a generator help when the recording has no pictures to show? | On three briefs that need pictures (an audio-only reading, a talk's numbers, a story set off camera), blind reviewers picked the clips of Claude Code with framx's optional `generate` (Volcengine Ark) over framx without it in 12 of 12 reviews, each pair seen in both orders. It generated in two of the three; in the third it drew cards with code like the other arm. Generation cost about 21 yuan. One run per brief and arm. | [AGENTS.md](https://github.com/Daveyuwang/framx/blob/main/eval/runs/AGENTS.md) |
| Does the check stop broken videos? | It caught 32 of 32 defects put into made clips, including a voice over one still card, with no false alarm on 11 clean ones (2026-12-01), on the cases its thresholds were set on. The still-picture check's thresholds were set on 40 clips from the agent benchmark: they flag the four Mandarin readings an agent delivered as one card with changing captions and none of the other 36, among them a keynote with a small speaker inset and an audiogram. On 12 clean edits of real recordings it said NOT READY for 3, each holding a real error in framx's own transcript, and passed one more real error ("a lot my index" for "LlamaIndex"). Measured on 2026-11-26; none of these clips was cropped, so the framing check is not covered here (see the agent benchmark). | [CHECK.md](https://github.com/Daveyuwang/framx/blob/main/eval/runs/CHECK.md) |
| Is speech recognition on the Mac good enough? | 3.4% and 5.3% word error rate on two TED talks, and a 55-minute talk indexed in 112 s on an M5. On a 14-minute talk, 8-bit weights and encoding each window once cut indexing time by a third and peak memory by 30%, with the same words. | [ASR.md](https://github.com/Daveyuwang/framx/blob/main/eval/runs/ASR.md) |
| Does memory make later edits need less fixing? | With a simulated user over 15 reviews in each of two task orders, typed defaults and rules that need a second video cut total edit cost by 37% against no memory. Measured later against the version before them, with a newer simulated user, pinned reference cuts and cleaner prompts lowered it 9% over three task orders, but it fell in two orders and rose in one, and nearly all of the drop came from a single order, so this is not significant (p = 0.23). | [simusers.py](https://github.com/Daveyuwang/framx/blob/main/eval/simusers.py) |
How it is built and why: [docs/ARCHITECTURE.md](https://github.com/Daveyuwang/framx/blob/main/docs/ARCHITECTURE.md).
## What framx does
The agent is the editor: it decides what plays and why. framx does three things an agent would otherwise script for itself on every edit:
- **It shows the material.** A transcript with word timing, the shots, contact sheets and frames, and for music the tempo, every beat and bar, the parts (and which come back, such as a chorus) and the ending. An agent cannot watch or listen, so it reads these.
- **It renders exactly what the agent writes.** One timeline holds the edit: clips from several files, stills, title cards, speed changes, transitions, text, overlays, a waveform of the voice, music and other sound. Every clip is a whole number of frames, sound is placed to the sample, and music sits a stated number of decibels under the voices.
- **It measures the result.** `check_video` says READY or NOT READY: captions against the speech, in time and in words, with a second opinion from Apple's own speech model on the Mac; cut edges inside words; distortion and dead air; people cut by the edge of a crop from wider footage; a picture that stands still while only the captions change; music joined off the bar; lines in another language without subtitles.
You review the result in the framx app, change words, clips, music and text, and framx keeps what you choose to remember for the next edit. framx runs as a local app that drives Claude Code, Codex, OpenCode or DeepSeek Harness for you, as an MCP server (stdio or loopback Streamable HTTP, with optional MCP Tasks, Elicitation, Skills resources and a lightweight review card) for those and other MCP clients, and as a command line tool.

## Requirements
- A Mac with Apple silicon. Speech recognition runs on the GPU through MLX.
- Python 3.12 or later, and [uv](https://docs.astral.sh/uv/).
- For `check_video`: the Xcode command line tools (`xcode-select --install`). They provide the Swift compiler that builds the Apple Vision OCR helper on first use.
- For the check's second listen on the Mac: macOS 26, whose own speech model gives an opinion independent of Whisper on each caption line Whisper hears differently. On earlier macOS, unless the [cloud check](#optional-cloud-check) is set up, those lines stay flagged until someone listens, so `check_video` says NOT READY more often, and its report says why.
framx downloads its speech model, `mlx-community/whisper-large-v3-turbo` (about 1.6 GB), the first time it indexes a video, and works offline after that. ffmpeg comes with the `imageio-ffmpeg` package, so nothing else needs installing.
## Set up with your agent
Tell any agent harness on your Mac (Claude Code, Codex, OpenCode, Antigravity, DeepSeek Harness or another that speaks MCP):
> Set up framx by following https://github.com/Daveyuwang/framx/blob/main/AGENT_SETUP.md
The agent installs framx, registers it with the harnesses it finds (`framx init`), checks the setup (`framx doctor`), and can start on a video in the same session through framx's commands while the tools load. To do it yourself:
```bash
uv tool install framx
```
```bash
framx init
```
```bash
framx doctor
```
`framx init` writes each harness's own config: `claude mcp add` for Claude Code, `[mcp_servers.framx]` in `~/.codex/config.toml`, `mcp.servers.framx` in OpenCode's config when it keeps servers there, or has none yet and OpenCode 2 is found, otherwise `mcp.framx` (which OpenCode 1 and 2 both read), with a note instead for `opencode.jsonc`, which may hold comments, a plugin in `~/.gemini/config/plugins/framx` for Antigravity, and an entry in `~/.dsh/cordis.patch.yml` for DeepSeek Harness, with tool calls allowed 30 minutes where the harness limits them (DeepSeek Harness allows 60 s by default), and the framx skill where the harness reads skills. It starts the server by its absolute path, or through `~/.config/framx/launch` when you have one, so an app that starts servers with a short PATH still finds it. It leaves a registration you made yourself as it is (a bare `framx mcp`, a wrapper script), points an entry init wrote (an absolute path to framx or to `~/.config/framx/launch`) at the current one, except a Claude Code entry with its own env, which gets a note, copies a file before changing it, and never writes an API key into a config file. `framx skill` prints the skill, and `framx skill --install DIR` writes it for another harness.
## Install
From PyPI:
```bash
uv tool install framx
```
From GitHub, or from a clone of this repository:
```bash
uv tool install git+https://github.com/Daveyuwang/framx
```
```bash
uv tool install .
```
## Use it as a plugin
This repository is a plugin marketplace for Claude Code and for Codex. The plugin starts framx's MCP server and adds a `framx` skill. It runs the `framx` command, so install framx first.
In Claude Code:
```bash
claude plugin marketplace add Daveyuwang/framx
```
```bash
claude plugin install framx@framx
```
Then type `/framx` to open the framx app, or `/framx a 45-second LinkedIn reel from ~/Movies/talk.mp4 with ~/Music/bed.mp3 under it` to have the session make the clip with the framx tools and open it for review. Clips you start in an app opened this way run on the session's model; an app started with `framx app` uses your Claude Code or Codex model setting.
In Codex:
```bash
codex plugin marketplace add Daveyuwang/framx
```
```bash
codex plugin add framx@framx
```
Then ask Codex for a clip or for the framx app; it loads the framx skill when the request fits.
To run your own build of framx, or to give it environment variables such as the cloud listener's settings, make an executable `~/.config/framx/launch` that runs framx with the arguments it gets. The plugin runs it in place of the `framx` command.
## The framx app
```bash
framx app
```
This opens framx in your browser. Choose a video, say what the clip is for and how long it should be, and pick Claude Code or Codex. You can add music and more footage, and say whether the edit goes by what is said or by the pictures. framx indexes the video on your Mac, then runs the agent's own command line tool on your subscription, headless, with its own tools, skills and MCP servers next to framx's. When the edit needs material you did not give, such as footage, a picture, music or a voice, the agent may find it or make it with those tools, save it in a `material` folder next to the clip, and say where each piece came from and under what licence. Settings sets what a run may do: everything the agent has, without asking (the default: a run has nobody to approve each step, so this includes the shell, downloads and the accounts your agent is connected to), or only what your own Claude Code or Codex settings allow. The one thing a run may not do is open the framx app again from inside it. You watch its steps, the passages it picks light up in the transcript, and its clips land on the timeline. Ask for up to five clips at once and the agent cuts each from a different part of the video, so you can pick: they open one at a time in the editor, Clip A, Clip B and so on, and each is reviewed, changed and kept like any other.
The editor shows the rendered clip on a timeline with a track for the video, text, captions, the clips' own sound, added voices and each music track, with waveforms as mixed, a line on every beat or bar of the music, and a letter for each part of the song. You can play it, change it, ask the agent for more changes in the same conversation, and see and forget what framx remembers.
On Home, choose **Needs review** to find clips with open issues or **Unchecked** to find renders awaiting a check. Open a clip from either list to see its checks. Select a timestamp to jump to the exact moment, or use the play button beside it to hear the passage in context. Each preview covers up to eight seconds. If playback pauses, **Resume** continues to the same endpoint. The replay button starts the passage again.
Expand a timed issue and choose **Show clip** to open its editing controls. If the issue spans a cut or a transition, you can open either clip. For a finding that names an audio track, **Show audio track** opens its sound settings.
Use **Undo** to take back a trim, a text change or a slider drag. **Redo** restores it. When the edit is ready, choose **Save and check** in the Checks panel to render the changes and check that version. The result follows the clip back to Home. Checks run from the CLI or agent appear in the same place.

Both screenshots use material made for them: a synthetic talk, generated footage and a generated song.
The app can drive Claude Code, Codex, OpenCode or DeepSeek Harness (`claude`, `codex`, `opencode`, or `dsh`), and opens in Bench and Review mode if none is ready; Settings shows what framx found. It serves pages on 127.0.0.1 only, and only to the browser that opened the address `framx app` printed. New clips go to `~/Movies/framx`.
## Use with Claude Code
```bash
claude mcp add --scope user framx -- framx mcp
```
Then ask for an edit, for example: "Make a 40-second vertical clip of the strongest argument in ~/Movies/talk.mp4, with captions." The agent indexes the file, reads or searches the transcript, plans and renders the cuts, and checks the result.
| Tool | What it does |
|---|---|
| `media` | What a file is (video, sound or picture: length, size, frame rate, sound, whether it is indexed), or the media files in a folder. |
| `index_video` | Transcribes the video with word timing, finds shots and tags what each shows, and finds the quiet points between words. Once per file; later calls return the cached index. Pass `names` to fix the spelling of people and products, and `speech=false` for footage without talk, which then takes seconds. |
| `transcript` | What is said, sentence by sentence or word by word, with times, shot changes with what each shot shows, and long pauses. Words Whisper was unsure of are marked `(?)`. |
| `shots` | Contact sheets: one small labelled picture per shot, or one every few seconds, to look over a video and pick shots without speech, with each shot's tags. |
| `search` | Sentences that match keywords or a phrase, and shots whose tags or on-screen text match them. |
| `frames` | Full pictures of a video at given times, so the agent can see who is on screen, where to keep the focus of a crop, and how a rendered video looks. |
| `music` | A track's tempo, every beat, the bars, its parts and which of them come back, loudness and how it ends. Given a length, it also says how to play the track in that time with its phrases whole: where to jump over whole phrases while keeping its ending. |
| `snap` | Moves times to the nearest beat, bar, shot change or pause, and says how far each moved. |
| `narrate` | Speaks a script with a voice on this Mac into a sound file, and says when each sentence starts and ends in it. |
| `fix_words` | Corrects words the transcript got wrong; captions, search and the transcript use the corrected words from then on. |
| `plan_cuts` | Takes rough `[start, end]` pairs of speech. Moves every edge into the pause next to it, clear of the words' sound, widens cuts to whole sentences, fits a target length inside the pauses, and lists what is still wrong, including cuts that run over twice the length you keep for the video's `purpose`. |
| `render` | Renders parts of one video back to back (`video` and `cuts`), or any edit as a `timeline`. Captions come from the transcript and never run past their clip; an `.srt` copy is written next to the video. Both a render and a `dry_run` write a `.words.json` next to the video (`clip.words.json` for `clip.mp4`), every word at its time in the output, for captions the agent writes itself. `dry_run` checks the edit and says what would play; `draft` renders fast for a look. Size, fit, captions, their look and the music level left out come from your preferences for the video's `purpose`. It warns about edges that clip a word, captions placed under a phone app's buttons and text that covers the captions, and replaces an existing file only if framx rendered it or the agent adopted its change to it. |
| `check_video` | Reads the burned-in captions with OCR, whoever drew them, and compares them with the speech: wrong words, captions that stay past a cut, edges that clip a word. Reports a picture that stands still for over half the video while only the captions change. Then measures the sound: loudness, peaks, silent stretches, and how many cuts land on a beat of the music. |
| `adopt` | Keeps a change the agent made in place to a video framx rendered, such as a colour grade, as that render, so `check_video` and the app still use its timeline. The file must keep its size and its length within 0.15 s. It is not a new version: the next render, the agent's or yours in the app, starts from the timeline without the change. |
| `app` | Opens the framx app in your browser. With `model`, clips started there run on that model. |
| `review` | Opens a rendered video in the framx app in your browser. |
| `export` | Writes the edit as a project for Final Cut Pro, DaVinci Resolve or Premiere Pro, to finish it there (see below). |
| `feedback` | Tells the agent what you changed in the app (for one rendered video, or unseen reviews across recent clips): passages and clips dropped, added or trimmed, caption words corrected, settings, the music level, proposal instructions and discarded proposals, your note, and the edit cost. |
| `profile` | Your preferences: setting defaults, rules, approved reference cuts, recent revision examples and spellings, the ones related to the video's purpose first. |
| `remember`, `forget` | Add a rule, merge rules or replace one, save a finished clip as an approved reference cut (`reference`), keep a setting as a default (`settings`, as the app's review keeps them) or the length the user asked for (`seconds`), or remove a preference by its id. Anything the user can do in the app, the agent can do with the tools. A rule the agent infers from one review stays tentative until a review of another video supports it, or you ask outright to remember it. |
## Timelines
A timeline is the whole edit as JSON. The agent writes it and `render` follows it; `framx timeline` renders one from the command line.
```json
{
"size": "1080x1920", "fps": 30, "captions": true, "loudness": -14, "fade_out": 0.5,
"video": [
{"source": "/videos/talk.mp4", "in": 62.31, "out": 80.12},
{"source": "/videos/broll.mp4", "in": 4.0, "out": 6.5, "mute": true, "zoom": [1, 1.15],
"transition": {"type": "fade", "duration": 0.5}},
{"image": "/pictures/chart.png", "duration": 3, "fit": "pad"},
{"title": ["Ada Lovelace", "Notes on the Analytical Engine"], "duration": 2.5}
],
"overlays": [
{"text": "London, 1843", "start": 0.5, "end": 3, "position": "top", "background": "#000000AA"},
{"image": "/pictures/logo.png", "start": 0, "end": 20, "box": [0.74, 0.04, 0.22, 0.12]},
{"waveform": "voices", "start": 3, "end": 20, "box": [0.1, 0.3, 0.8, 0.15], "color": "#7FD1FF"}
],
"audio": [
{"source": "/music/bed.mp3", "in": 12.4, "under": 18, "duck": true, "fade_out": 2}
]
}
```
- `video` plays in order. A clip is part of a video (`in`, `out`, and optionally `speed` from 0.1 to 10, `reverse`, `gain`, `mute`), one held frame (`at`, `duration`), a still (`image`), a plain colour, or a title card over the blurred frame before it or a colour. Any clip can take a `transition` from the clip before it, a `fit` (crop, pad or blur), a `focus` point, a `zoom` from one scale to another, a `look` (brightness, contrast, saturation, gamma) and its own ffmpeg `filters`, applied to its picture before it is fitted to the frame.
- Two focus points, `"focus": [[x1, y1], [x2, y2]]`, show two crops of one clip's picture: stacked in a tall or square frame, side by side in a wide one, the first point first, each tightened by the clip's `zoom`. In a tall or square frame where every picture clip is split this way, the captions sit on the seam.
- `background` fills the frame around a picture that does not fill it, with `"fit": "pad"` or where a follow crop widens: a colour, `"blur"`, or the path of a still picture such as a card the agent made. It is black by default, and a timeline-level `background` sets it for every clip but title cards. A clip's `look` grades its picture, not the background. Such a picture, like one over a blurred copy of itself (`"fit": "blur"`), is placed so its bottom edge does not run through framx's captions: it moves up above them when room is left, otherwise down so the captions sit on it.
- `overlays` are text or pictures and videos in a box, drawn over the video between two output times, with a fade and an opacity. Text at `"bottom"` sits above the captions in a video that has them, where they would otherwise cover it. A `waveform` overlay draws the sound as it plays in its box, the voices alone (`"voices"`: the clips' own sound and voice tracks, without the music) or all of it (`"mix"`), for speech with no picture of its own such as a reading or a podcast; `render` reports one that sits across the captions, and an export leaves it out and says so.
- `audio` tracks are music, voice-over or effects. `under` sets a track that many decibels under the voices, measured as loudness, so the agent does not guess a gain for a file it cannot hear. With `duck` the track rises by that depth where no voice plays. A music track that gives neither `under` nor `gain` sits 18 dB under the voices, or the level you kept in a review. `gain` sets a level by hand. For sound that leads or trails its picture, mute the clip and add the same file under `audio`.
- The whole mix is brought to `loudness` (default -14 LUFS, what YouTube, TikTok and Spotify play back at) with peaks held at -1 dBFS; AAC encoding adds about half a decibel to the peaks of the delivered file, as the platforms' -1 dB guidance expects.
- `subtitles` are lines the agent writes itself, with output times, for speech framx does not transcribe, such as dialogue in another language. They are drawn like captions.
- `caption_file` is the agent's own `.ass` script, burned in over the picture, for captions `caption_style` cannot draw, such as word-by-word karaoke or two languages. Its PlayResX and PlayResY must equal the output size, its times are in output seconds, and its fonts must be installed. Lines in the style `Caption` caption the speech: they go into the `.srt`, and `check_video` compares them with what is said. Lines in other styles are drawn and not compared. The agent writes the file from the `.words.json` next to the video. A `caption_file` turns framx's captions off unless `captions` is true.
- `caption_style` changes how captions look: `keywords` (a few short phrases to colour in place of the spoken word), `highlight` (their colour, or `false` for none), `color`, `font` (any font installed on the Mac; framx measures how wide it draws and refuses one libass cannot find, which it would replace with another face such as Helvetica or Monaco), `size` against the default (1.2 is a fifth larger), `position` of the bottom edge, `area` (the span of the width to centre them in, beside an inset picture) and `background` (a box).
- `"snap": "beats"` (or `"bars"`) moves every cut onto the nearest beat of the first music track by ending the clip before it there, by at most half a beat. The agent gives clip lengths roughly; framx places the cuts.
## Use with Codex and opencode
Codex reads MCP servers from `~/.codex/config.toml`. Its default tool timeout of 60 s is too short for indexing and caption checks, and in `codex exec` a tool that needs approval is refused, so raise the one and approve framx's tools:
```toml
[mcp_servers.framx]
command = "framx"
args = ["mcp"]
tool_timeout_sec = 1800
default_tools_approval_mode = "approve"
```
opencode 2 reads `~/.config/opencode/opencode.json`:
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {"servers": {"framx": {"type": "local", "command": ["framx", "mcp"],
"timeout": {"startup": 30000, "catalog": 30000, "execution": 1800000}}}}
}
```
## Review and preferences
Open a clip in the app, or after a render let the agent call `review`, or run `framx review clip.mp4`. The editor plays the video and lists its clips. Spoken clips show as text: click a word to start or end the clip there, leave it out, or correct its spelling, and add sentences from the source transcript. Other clips show a picture and their times, which you can change. Drop or reorder clips; choose how each clip comes in (a cut, a fade, a fade through black or white, a wipe, a slide or a circle, and for how long) and how fast it plays; change the shape, fill, crop focus (drawn on a frame of the source), captions, end card and length; set how far the music sits under the voices, whether it comes up between them, and its fade; add text on screen at the playhead, or change, move or remove the text that is there; put a picture over the video at the playhead, in a top corner, the middle or the whole frame, while the sound plays on, and change when it shows and where; hold the frame at the playhead, which splits its clip there; add a clip or picture from another file after the clip at the playhead; add a music file; leave a note.
In **Source transcript**, click a sentence’s time to hear it in the original recording. Playback stops at the end of the sentence. Click another time to compare, then **+** to add the line you want.
Choose **Preview changes** to watch the unsaved edit or **Play** beside a passage to start there. In the player, choose **Edit here** when you hear a word you want to change. It pauses playback and opens that word’s cut and spelling controls. During a pause it selects the clip, and on the end card it opens the card text. **Save and render** writes the new version to the same file.
Each save is logged with what changed, the length before and after, and its edit cost: the word-level edit distance between the speech the two versions play, plus one per changed setting, per corrected caption word, and per clip, sound or text put in, taken out or retimed, after PRELUDE ([Gao et al., NeurIPS 2024](https://arxiv.org/abs/2404.15269)). A falling cost over many videos means the edits need less fixing. The app then offers what to remember: a changed size, fit, captions, caption look, end card, music level, whether crops follow the subject, whether music comes up between the voices, its fade and beat snapping, as a default, the length of your version (for both spoken clips and multi-track timelines), a corrected name as a spelling for every video, your note as a rule, and concrete revision examples or an approved reference cut. Nothing is kept without your tick. You can also mark any saved clip as a **Reference** in the editor, or import an existing finished video under **What framx remembers** (`framx reference`).
Accepted and discarded draft proposals record what you asked the assistant to change so future runs see why a cut changed. **What framx remembers** shows every typed default, rule, reference cut, revision example, spelling, deterministic repeated-override suggestion (seen across two or more different videos) and recurring check pattern in one place, where each item can be kept, dismissed or forgotten.
Until you have said what clips for a platform should keep and how long they should be, a save that changed what is said also asks: "What should YouTube clips keep, and what should they cut?", with the agent's tentative rules for that platform as answers you can pick or reword, and a length in seconds. Your answer applies from the next clip: the rule comes before the rules the agent inferred, and the length replaces the one learned from your kept clips. framx asks because a few reviews' changes are too weak a signal to infer content taste from, and because you keep a clip once it is near enough, so kept lengths run long. When you work through Claude Code or Codex instead of the app, `feedback` tells the agent to ask you the same question.
Preferences are kept by platform. "LinkedIn reel for managers" and "LinkedIn post for team leads" share what was learned for LinkedIn clips, while "TikTok post" never borrows from "LinkedIn post"; a purpose without a platform matches by its words. The length you keep is the middle of the lengths of your reviewed clips for that platform.
The agent reads your changes with `feedback` and turns what they show about content, tone and pacing into rules with `remember`. A rule from one review stays tentative: it is used once a review of another video shows the same, when the agent restates it with `replaces`, or when you ask outright to remember it or keep it in the app. Before the next edit the agent calls `profile` with the video's purpose and gets the typed defaults, the length, and at most five rules for that platform; it merges rules when there are more. `render` applies the setting defaults and the music level, and `index_video` applies the spellings, also to videos indexed before.
framx also learns from its own checks. Every `check_video` run is logged with the kinds of problems it found, and the last check of a video is what was handed over. A kind of problem left unfixed in two videos or more, and in at least half the videos where it came up, becomes a lesson: `check_video` says so when it finds that kind again, `profile` warns the agent before it plans, and `framx lessons` lists how agents dealt with each kind, so whoever improves framx can see which hints should become support.
These rules come from a simulated-user evaluation ([`eval/simusers.py`](https://github.com/Daveyuwang/framx/blob/main/eval/simusers.py)): typed defaults stopped repeated settings edits after one review, while rules inferred from single edits piled up, often specific to one talk.
Preferences and the review log stay on your Mac in `~/Library/Application Support/framx` (set `FRAMX_DATA` to move them). The agent sees only what these tools return.
## Command line
The same tools as commands:
```bash
framx app
framx media ~/Movies/trip
framx index talk.mp4 --names "Ada Lovelace" "Analytical Engine"
framx index broll.mp4 --no-speech
framx shots broll.mp4 --out sheets
framx music bed.mp3
framx snap bed.mp3 beats 4.1 7.9 12.3 --offset -12.4
framx search talk.mp4 "the engine could compose music"
framx frames talk.mp4 62.5 140.2 --out stills
framx plan talk.mp4 '[[62.5, 80], [140.2, 151]]' --target 30
framx render talk.mp4 '[[62.31, 80.12], [140.05, 151.4]]' clip.mp4 --size 1080x1920 --focus 0.4 0.5 \
--end-card "Ada Lovelace" "Notes on the Analytical Engine" --length 31 --purpose "LinkedIn reel"
framx timeline edit.json clip.mp4 --dry-run
framx timeline edit.json clip.mp4
framx check clip.mp4
framx review clip.mp4
framx export clip.mp4
framx feedback clip.mp4
framx profile --purpose "LinkedIn reel"
framx reference clip.mp4 --purpose "LinkedIn reel" --note "Direct hook and tight pacing"
framx remember "Keep the audience's laughter after a punchline" --purpose "LinkedIn reel"
framx forget r3
framx init --dry-run
framx doctor --json
framx skill --install ~/.agents/skills
```
Indexes and render records are kept in `~/.cache/framx` (set `FRAMX_CACHE` to move them). An index belongs to one file path, size and modification time; editing or moving the video makes framx index it again.
## Finish in another editing app
To grade the clip or add titles and graphics in your own editing app, choose **Export project** under Settings in the editor, ask the agent, or run `framx export clip.mp4`. framx writes a folder next to the clip, `clip project`, with:
- `clip.fcpxml` for Final Cut Pro and DaVinci Resolve (FCPXML 1.9),
- `clip.otio` for Premiere Pro 26 or later and DaVinci Resolve (OpenTimelineIO),
- `clip.srt`, the captions and subtitles, to import as a caption track,
- `stills/`, pictures some clips need.
The clips point at the original files, not at the render, so grading starts from the source; keep them where they are. The cut, speed changes, transitions (as cross dissolves centred on the cut), pictures, the music and other sound tracks, and markers come across. The .fcpxml also keeps each clip's crop to the frame and its focus point, where a picture over the video sits and how large, each track's level with its fades and the music's dips under the voices. What an editing app cannot take as framx drew it comes another way: a title card or a plain colour is a still of the render, a held frame a still of the source, text on screen a marker with its words. A crop that followed the subject comes in centred, and push-ins, colour looks, other transition shapes, overlay fades and the final loudness and limiter are left out. The export lists what differs for each clip.
## Optional cloud check
Local transcription gets most words right but sometimes mishears a term both times it listens, and a caption then shows the wrong word. framx can ask a cloud speech model about the doubtful stretches only. Point it at any OpenAI-compatible chat endpoint whose model accepts audio input:
```bash
claude mcp add --env FRAMX_CLOUD_BASE_URL=https://api.example.com/v1 \
--env FRAMX_CLOUD_API_KEY=your-key --env FRAMX_CLOUD_MODEL=your-audio-model \
--transport stdio --scope user framx -- framx mcp
```
With these set, `index_video` runs a second local transcription with shifted chunks and no word timing. Where the two transcriptions disagree, it sends that stretch with a second of context to the cloud model and keeps the version the cloud model hears. Words Whisper was unsure of that are not dictionary words get a listen too. The names you pass go with each clip as a spelling hint. Nothing else leaves the Mac, and `index_video` reports how many seconds of audio it sent. In our tests that was 0 to 4% of a talk's audio, and 16% of a panel with several speakers. `check_video` uses the same model for a second opinion on each caption it flags. `FRAMX_CLOUD_EXTRA` takes JSON to merge into every request, for provider-specific options.
## Optional generator
When an edit needs material nobody gave, such as a card, an illustration or an establishing shot, an agent can make it with a generation API. framx gives it a `generate` tool (and `framx generate`) once a key is set, saves each result in the clip's material folder and writes how it was made beside it. The API tested is Volcengine Ark: Seedream 5.5 for pictures, including ones on a transparent background for cards and overlays, and Seedance 2.5 for video shots without sound, from a prompt or from a picture as the first frame.
```bash
claude mcp add --env FRAMX_GEN_API_KEY=your-ark-key \
--env FRAMX_GEN_LIMIT=images=8,video_seconds=15,daily_images=30,daily_video_seconds=60 \
--transport stdio --scope user framx -- framx mcp
```
- `FRAMX_GEN_BASE_URL` (default `https://ark.cn-beijing.volces.com/api/v3`), `FRAMX_GEN_IMAGE_MODEL` and `FRAMX_GEN_VIDEO_MODEL` (default `doubao-seedream-5-5-261028` and `doubao-seedance-2-5-260628`) pick the endpoint and models; `FRAMX_GEN_EXTRA` takes `{"image": {...}, "video": {...}}` to merge into the requests. framx sends plain HTTP and uses no provider SDK.
- `FRAMX_GEN_LIMIT` caps pictures and seconds of video, not money: per clip's material folder and per day across folders, with the values above as the defaults. A request takes its share before it is sent and gives it back if it fails, drafts count like any other seconds, and each result says what is left. The account's balance is the real limit.
- A shot takes one to two minutes. A 480p draft costs about a fifth of a 1080p shot; on Ark the finished shot made from a draft (`from_draft`) is 1080p only. A shot still being made after five minutes comes back as a task id that `generate` fetches later without making it again.
- Each file gets a record beside it, named after the file with `.made.json` added: how it was made, whether it is AI-generated, the model, prompt, picture it started from, the request, tokens, time and terms. The agent writes the same record for material it makes with code or downloads. `media` and the editor show where each file came from, `export` lists the AI-generated ones, and `check_video` measures them and names material in a `material` folder that has no record.
- Runs the app starts only to propose a change never get `generate`, so nothing is spent before you accept.
Measured on Ark on 2026-12-01: a 1080x1920 Seedream picture in 15 to 23 s, a 5-second 480p Seedance draft in 60 s (48,437 tokens), the same shot from a first-frame picture in 138 s, and a 1080p shot from the draft in 38 s (245,025 tokens). Ark counts width x height x frames / 1024 tokens; the price list was not available to check.
## How it works
- **Transcription.** Whisper large-v3-turbo on MLX, in 60-second chunks that end at the quietest point nearby, with greedy decoding that does not condition on the previous text. Against the human transcripts of two TED talks (14 and 20 minutes), word error rate was 3.4% and 5.3%. Whisper's default decoding, which conditions on earlier text and retries at higher temperature, gave 4.9% and 13.9% because of repeated-phrase loops, and took about three times as long. On an M5 Mac, a 5-minute talk indexes in 30 seconds and a 14-minute talk in 72 seconds with the second transcription. Shot detection runs on the CPU at the same time. The model runs at 8 bit, quantized once on this Mac, and each 30-second window is encoded once where mlx-whisper would encode it twice (once to decode, once to time the words). On the 14-minute talk that took indexing from 56 s to 37 s and peak memory from 2.1 GB to 1.5 GB, with the same words and word times. A 55-minute talk indexes in 112 seconds, nine tenths of it transcription, and the encoder there is bound by arithmetic: decoding eight windows at once saved 12% for 900 MB more memory, so framx does not. The precision sweep, the profiles, the batching test and a comparison with macOS's own speech model are in [`eval/runs/ASR.md`](https://github.com/Daveyuwang/framx/blob/main/eval/runs/ASR.md).
- **Cut points.** Whisper's word times often end before the sound does. On three talks a word's sound ran on past Whisper's end by a median of 0.09 to 0.17 s, and by 0.22 to 0.30 s for one word in ten, so a cut placed at Whisper's word end clips the word ("capacities" plays as "capacity"). framx reads from the sound level where each word's sound starts and ends, and stores the quietest 10 ms point of every gap between words. `plan_cuts` keeps edges outside the words' sound and never past those quiet points, also when it trims pauses to fit a target length, and `render` and `check_video` report any edge that still clips a word.
- **Languages.** framx tells a video's main language from three 30-second windows at a sixth, half and five sixths of the way through, and transcribes in it; `index_video` takes `language` when the guess is wrong. Chinese and Japanese are written without spaces, so their words are single characters: cuts, search, captions and the caption check work by character, captions break by width (a character counts as two Latin letters) and between words, which Apple's NaturalLanguage tokenizer finds on the Mac (a Japanese particle stays with the word before it), and drop a line's closing comma or full stop, and a long sentence also ends at a comma after 8 seconds, since Whisper runs Mandarin on with commas. On a synthetic Mandarin talk of 74 seconds (a macOS voice reading a known script), the character error rate was 0.6% once numbers written as digits are counted as right and indexing took 6 seconds; on a real 8-minute Mandarin reading in the agent benchmark, the check read all 16 caption lines of the agent's clip. English indexes are unchanged word for word. The cloud check and name spellings are English only.
- **Other languages.** Dialogue in a language other than the main one falls between its words. framx listens to a sample of those stretches and, when one holds another language, transcribes all of them in their own language and marks them in the transcript. Captions leave them out, and the agent writes subtitles for them with the timeline's `subtitles`. On a film essay with three Korean lines, all three were found; on English talks the check adds about 15 seconds to indexing.
- **Shots.** PySceneDetect finds cuts by how much the picture changes between frames. In black and white, hue and saturation do not change at a cut, so when eight sampled frames have almost no colour only brightness is compared: a 102-minute black-and-white film went from 4 shots to 679. Apple Vision then tags the middle picture of every shot with its scene labels (such as people, crowd, airplane, document), the text on screen (slides, signs, titles, read in English and Chinese) and how many people and faces are in it. That takes about 40 ms a shot and runs while the GPU transcribes, so a 55-minute talk's 42 shots or a feature film's 679 add no waiting. The transcript shows the tags at each shot change, and `search` finds shots by them: "airplane" in the film finds its aircraft shots, and a product name finds the slide that shows it.
- **Following the subject.** A clip with `"focus": "follow"` is cropped by a window that tracks its subject. Apple Vision finds people, faces and what draws the eye in four frames a second on this Mac; the window holds still while the subject stays near its middle, moves at a limited speed when it leaves, and jumps only at a shot change. This fills a tall frame from wide footage with a crop rather than the whole picture shown small. When the action is wider or faster than the window can follow, framx plays the window's path over the frames Vision looked at, and where the subject would leave it in more than 15% of them the view widens in steps, the picture showing smaller on the clip's `background`, black unless the timeline gives another: until the background takes 22%, 35% or half of the frame's height, and last the whole picture. Before, it was a blurred copy of the picture, which `"background": "blur"` brings back. The render report says which clips widened; a clip given a fixed focus is cropped as asked. On eight boxing clips cut to 1080x1920 (32 s, measured over the blurred fill), check_video found fighters cut by the frame's edge 7 times, about 7.5 s, with the crop alone; with the widening it found 2, 2 s. Four clips were shown whole, where the picture fills a third of the frame's height, two at 65% and one at half.
- **Captions.** Cues come from the word timings of each clip. They break at sentence ends and pauses, and a longer phrase becomes captions of at most two even rows, split at a comma or a breath rather than after a word such as "the" or "and", and never inside a key phrase. A cue is up for at most 6 s of speech, stays up through a pause of up to 1.5 s until the next one replaces it, and never runs past its clip. How many characters a row holds follows from the font, the size and the frame's width, and framx breaks the rows itself. The look is Arial Black in white with an outline and a soft shadow, the word being spoken in yellow; Chinese and Japanese use PingFang and colour no word, since a word there is one character at a time. `caption_style` keywords colour chosen phrases instead. In a 9:16 frame captions sit above the bottom quarter and in from the right edge, where TikTok, Reels and Shorts draw the account, description and buttons; in a 4:5 frame they end at 85% of the height, and in a square or wide one at 88%, clear of a player's controls. This look comes from the agent benchmark, where blind reviewers chose the bare agent's clip in 12 of 16 picks, 7 of them for its captions and layout: heavier type with a shadow, two rows, key words in colour ([`eval/runs/AGENTS.md`](https://github.com/Daveyuwang/framx/blob/main/eval/runs/AGENTS.md)). Run again with it, the reviewers chose the framx clip in 9 of 16 picks and scored the two arms' captions about the same. Another font installed on the Mac is measured in one ffmpeg run of about 0.05 s, so its rows still fit: Menlo and Impact captions stayed inside their area at 1080x1920. For a look `caption_style` cannot give, the agent writes its own `.ass` script (`caption_file`) from the words file the render writes. `Caption` lines with the same text that touch or overlap count as one caption, so a karaoke line drawn word by word is checked once (87 events became 15 captions on a TED excerpt), and render flags a `Caption` line most of whose words are not spoken within 0.6 s of it, from the word times alone.
- **Rendering.** framx turns the timeline into one ffmpeg filter graph for the picture and mixes all sound itself at 48 kHz, so both follow the same arithmetic: every clip is a whole number of frames at the output rate, and its sound starts on the matching sample. Each clip ends on the frame nearest its exact running time, so rounding never adds up over many cuts: on a 20-second montage cut to a 124 BPM track, all 12 cuts sat within half a frame of the beat. A test timeline of seven clips with a cut, a fade, a 2x clip, a held frame, a still, a title card, two overlays and ducked music came out with every frame from the intended source frame and the exact sample count.
- **HDR footage.** iPhones film HDR by default (HLG, under Dolby Vision). framx converts HLG and PQ pictures to SDR BT.709 wherever it shows one: in renders, frames and contact sheets, and in what Apple Vision looks at. Without this, an iPhone clip came out grey and washed out. The conversion is fitted to Apple's own (`avconvert` to H.264): on HLG and PQ versions of two real clips, framx's frames differed from Apple's by 1 to 4 of 255 levels on average, and the unconverted pictures by 18 to 34. It runs after a clip is scaled to the output size, which added about 15% to the render time of 4K footage. Renders are always SDR.
- **Sound.** Loudness is measured with EBU R 128. A track given `under` is measured on its own and against the voices, then set that far below them; a ducked track follows the voices' level with an attack that finishes as a voice starts. The mix is then brought to the target loudness, with a look-ahead limiter taking up to 6 dB off the loudest peaks and the peaks held at -1 dBFS; where that is not enough, the mix stays quieter and the report says by how much.
- **Music.** Beats come from the spectral flux of the track, with the low band weighted so a kick outweighs an off-beat hat, tracked by dynamic programming at the tempo the autocorrelation finds. When nearly all beats sit on one fixed grid, as in produced music, framx fits that grid and uses it, so a stretch where the tracker followed off-beat accents is put back on the beat; music whose tempo moves keeps the tracked beats. The bar length (three or four beats) and the first beat of the bar come from where the bass hits hardest and the chords change. On four released tracks (electronic at 124 BPM, pop at 110, a waltz at 77 and a ragtime piano that speeds up as it is played), the tempo matched the composer's stated BPM on the three steady ones, the waltz read as 3/4, and the beats sat within 8 ms of the onsets found by a separate measure. On three synthetic tracks with known beats, every beat was found within 5 ms and every bar started on a true downbeat. Parts come from comparing bars by harmony, timbre and level: a part starts where the four bars before differ most from the four after, and a part that resembles an earlier one gets its letter, so the loudest part that comes back points to the chorus. On two synthetic songs with parts at one loudness (forms ABAB and AABACB), every part got the right letter and every boundary but one fell on the right bar; the one was a bar early. In the 110 BPM pop track the parts came out every 8 bars as A B C D A D C.
- **Checks.** `check_video` opens with READY or NOT READY. Apple Vision reads the lower part of the picture ten times a second, from where a framx render drew its captions down (from 55% of the height down in a file without framx's captions, and the whole frame when they come from a `caption_file`), and says NOT READY when it can read none of the captions the render drew (framx's, or a `caption_file`'s Caption lines), and Whisper transcribes the rendered file's own sound, in the source's language or, for a file framx did not render, in the language it hears. A caption is flagged when its words differ from the speech or when it stays past a cut, and the captions as a whole when, at the median, they show 0.6 s or more off their words. Each line whose words differ gets a second listen from a model of another family: the cloud listener when one is set up, otherwise Apple's own speech model on the Mac (macOS 26), and the vote among OCR, Whisper and that model separates caption errors from OCR misreads, near spellings and names. A word given to `index_video` as a name gets the same second listen, and only a word that looks like a name (CamelCase, or not in the dictionary) can pass as one, so a misheard word passed as a name is still flagged. With neither listener (macOS before 26 and no cloud listener), the flagged lines stay as problems, and the report says so. Captions the agent burned in itself, with framx's turned off, are read and compared the same way, and their fix names where they were drawn instead of `fix_words`; when the check reads no captions and the render drew none, it says so as a measurement, not a problem. A wrong word in the agent's own captions was caught in 4 of 4 tries (three real talks and a test clip), and 5 real clips without captions, two of them boxing with graphics on screen, passed. A check of a 30 to 45 s clip without framx's captions takes about 10 to 25 s. Without framx's own lines to compare, an OCR misread is harder to dismiss: on one of three talks with the agent's styled captions, a 0.3 s misread of "I'll" was flagged. On a render changed outside framx and adopted, a line counts as one framx drew when half its words or more are among framx's captions there, so its misreads are dismissed as before: "I'd" read as "lPd", which was flagged when every line was read as the agent's own, no longer is. A render changed in place after framx made it is NOT READY until the agent calls `adopt`; after that the checks that need its timeline run again, and the captions and picture are read from the file. The sound is checked for distortion, dead air and, in a file framx did not render, speech cut off mid-word. In a clip cropped to another shape than its source, Apple Vision looks twice a second, and four times in a clip shorter than two seconds. In a crop narrower than its source, such as a tall crop of wide footage, it looks for a face cut by the left or right edge, or a person cut there whose face is not whole and central: a close-up crops the shoulders by design. Each crop of a split is looked at as a picture of its own, at its sides where it trims the picture's width and at the top and bottom where it trims its height, and its finding names the focus point to move. In a crop wider than its source, such as 4:3 footage filled to 16:9, it finds the faces in the source, where they are whole, and the rows the crop and zoom keep say whether a fifth of a face or more is cut off at the top or bottom: on the rendered frame, Vision boxes a face whose eyes the top edge cuts off a little below the edge, as if it were whole. It reports a cut seen in two looks in a row, which is a second or more, or half of a clip shorter than two seconds. A passage split into clips to frame each part plays its sound straight through as one stretch, so its seam is not checked as a cut inside a word. On 30 defects put into made clips, it caught 30 (12 before the timing, sound and language checks added on 2026-11-26), with no false alarm on 10 clean ones; on 12 clean edits of real recordings it said NOT READY for 3, each holding a real error in framx's own transcript. Details in [`eval/runs/CHECK.md`](https://github.com/Daveyuwang/framx/blob/main/eval/runs/CHECK.md).
## Limitations
- Speech in Chinese, Japanese and other languages is transcribed, but accuracy is measured only on English and a synthetic Mandarin talk; a real Mandarin reading has gone through the agent benchmark, and Japanese only through unit tests; the cloud check and name spellings are English only.
- Apple silicon only. The check's second listen on the Mac needs macOS 26; on earlier macOS only the cloud check settles the caption lines Whisper hears differently.
- HDR footage is converted to SDR, and the conversion is checked against Apple's on HDR made from SDR clips, not yet on an iPhone's own recordings. There is no HDR output.
- Beat tracking is tested on four released tracks and three synthetic ones. Bars are 3/4 or 4/4 and the first beat of the bar is a best guess. Parts and the chorus hint are tested on synthetic songs; on released music they look musical (8-bar parts) but are not checked against annotations.
- In the app a picture goes over the video in a top corner, the middle or the whole frame; another place, a video over the video, or a fade on it goes through the agent.
- Exported projects pass Apple's FCPXML 1.9 DTD, and OpenTimelineIO reads the .otio back with every clip, transition and speed where the render has them, but neither file has been opened in Final Cut Pro, DaVinci Resolve or Premiere Pro yet, and a source at another frame rate than the clip is the case least checked.
- No speaker labels, and no camera moves beyond a push in or out and the crop that follows a subject.
## License
Apache-2.0
This server cannot be deployed
Maintenance
ActivityNo data
ResponsivenessNo recent community issues