--- license: other license_name: per-clip-licenses pretty_name: ReelCodeBench language: - en task_categories: - video-text-to-text tags: - arxiv:2611.36565 - video-to-code - code-generation - video-editing - benchmark - animation size_categories: - n<1K configs: - config_name: reconstruction data_files: - split: test path: data/reconstruction.jsonl - config_name: edit data_files: - split: test path: data/edit.jsonl --- # ReelCodeBench ReelCodeBench tests whether a model can turn a short video into code that renders it, and then change that code to follow an edit request. - **Reconstruction (420 clips).** The model sees frames of a reference video and writes one self-contained `index.html` that reproduces it. - **Editing (420 tasks, one per clip).** The model gets its own reconstruction and a text edit request with one to three changes (where / when / how), and edits the code. Paper: **arXiv: https://arxiv.org/abs/2611.36565** ยท Homepage and leaderboard: https://mrakas.github.io/reelcode Code, renderer and evaluation: **GitHub: https://github.com/mrakas/reelcode** ## Files ``` data/reconstruction.jsonl 420 clips: metadata, frame list, rubric data/edit.jsonl 420 edit tasks: instruction, changes with time windows and check questions, must-stay items videos/.mp4 reference videos frames//*.jpg reference frames at 2 fps (what the solver sees) prompts/*.md the exact prompts used in the paper ``` ### `reconstruction` | Field | Meaning | |---|---| | `clip_id` | clip id, also the key into `edit` | | `source`, `source_group`, `source_url`, `author`, `title`, `license` | where the video comes from and its license | | `duration_s`, `width`, `height`, `fps` | the reconstruction must match `width` x `height` and `duration_s` | | `video` | path of the reference video | | `frames` | `[{t, file}]`, reference frames at 2 fps; give all of them to the solver | | `judge_frame_indices` | indices into `frames` shown to the judge (at most 60) | | `rubric` | 10-14 yes/no items `{id, question, weight, dim, time}` used by the reconstruction judge; `dim` is text, layout, style, motion or timing | | `content`, `form`, `motion`, `is_3d`, `complexity` | category labels | ### `edit` | Field | Meaning | |---|---| | `task_id`, `clip_id` | task id and the clip it edits | | `instruction` | the edit request given to the model (English); `instruction_zh` is a Chinese version | | `changes` | `[{desc, domain, section, operation, window, checks}]`: what should change, in which time window, and the yes/no questions the judge answers | | `must_stay` | things that must not change, used by the judge | | `tags` | reach, instruction form, grounding, intent | ## Loading ```python from datasets import load_dataset from huggingface_hub import snapshot_download recon = load_dataset("marcuskwan/ReelCodeBench", "reconstruction", split="test") edit = load_dataset("marcuskwan/ReelCodeBench", "edit", split="test") root = snapshot_download("marcuskwan/ReelCodeBench", repo_type="dataset") # videos and frames ``` ## Minimal reconstruction call ```python import base64, json, re from pathlib import Path from openai import OpenAI P = Path(root) / "prompts" fill = lambda t, **kw: re.sub(r"\{(\w+)\}", lambda m: str(kw.get(m.group(1), m.group(0))), t) x = recon[0] prompt = fill((P / "recon.md").read_text(), n_frames=len(x["frames"]), duration=x["duration_s"], width=x["width"], height=x["height"], fps=x["fps"], frame_list="; ".join(f"image {i+1} = t {f['t']:.2f}s" for i, f in enumerate(x["frames"])), RECORDER_CONTRACT=(P / "recorder_contract.md").read_text(), vendor_list=(P / "vendor_list.md").read_text(), canvas_w=x["width"], canvas_h=x["height"]) images = [{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64," + base64.b64encode((Path(root) / f["file"]).read_bytes()).decode()}} for f in x["frames"]] r = OpenAI().chat.completions.create(model="gpt-5", messages=[{"role": "user", "content": [{"type": "text", "text": prompt}, *images]}]) html = re.search(r"```html\s*(.*?)```", r.choices[0].message.content, re.S).group(1) Path("index.html").write_text(html) ``` Rendering `index.html` to video and judging it are done by the evaluation code on GitHub. ## Scoring Every item is scored by two judges and the two are averaged. Failed items score 0. - Reconstruction: `S = 0.5 * DA + 0.5 * H`. DA is the share of rubric weight in dimensions whose items all pass. H is the mean of four 1-5 holistic scores mapped to 0-100. - Editing: `S = 100 * sqrt(C * (0.5 K + 0.5 Q))`. C is change completion, K is the share of must-stay items kept, and Q is visual quality. The judge compares the edited render against the original video. ## Citation ```bibtex @article{kwan2026reelcodebench, title = {ReelCodeBench: Can Frontier LLMs Edit What They Rebuild?}, author = {Kwan, Hohin and Li, Hongyu and Yu, Hao and Tsai, Chi Hsu and Yang, Pei and Chen, Houyuan and Liu, Si and Rao, Anyi}, journal = {arXiv preprint arXiv:2611.36565}, eprint = {2611.36565}, archivePrefix = {arXiv}, primaryClass = {cs.CV}, year = {2026}, url = {https://arxiv.org/abs/2611.36565} } ```