Benchmark LLMs by having them autonomously create music videos
Music Video Arena is an agentic benchmark where LLMs compete to research, generate, and ffmpeg-edit a full music video within a hard USD budget.
Why it matters
Evaluate and compare how different large language models plan, budget, use tools, and exercise creative judgment by having them compete to produce the best music video from a song file, API keys, and a fixed dollar budget.
Outcomes
What it gets done
Research and select video/image generation models via web search within budget constraints
Generate video clips and images by calling FAL and Replicate APIs with metered spend tracking
Edit and sync media to audio using ffmpeg commands for cutting, concatenating, and muxing
Iterate on output by watching results, recovering from errors, and refining until producing final MP4
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/hershalb-music-video-arena | bash Overview
Music Video Arena
Music Video Arena is an agentic benchmark where LLMs are given a song, a hard USD budget, FAL/Replicate API access, and an ffmpeg shell tool, then autonomously research, generate, and edit a complete music video end to end, with a human subjectively judging the results. Use it to observe and compare how LLM agents plan, spend a budget, and exercise creative taste on an open-ended multi-tool task; run it only in an environment you trust, since its shell-command tool executes arbitrary commands directed by the model.
What it does
Music Video Arena is an agentic "arena" where large language models compete to make the best music video from a given song. Each model gets a hard USD budget, both a FAL and a Replicate API key, a web-search tool, and a run_command tool with local ffmpeg/ffprobe on PATH, then it iterates on its own: research which generation models exist, generate clips, edit with ffmpeg, watch the result, and refine, until it produces a final output.mp4 synced to the track. The winner is judged subjectively by a human - the point isn't a pass/fail benchmark score but watching how different models plan, spend a budget, use tools, recover from failures, and exercise taste, none of which a one-shot "build me an app" benchmark captures.
For each agent, the harness creates an isolated workspace and copies the song in, runs a multi-step tool-calling loop (built on the Vercel AI SDK) until the model stops, hits a step cap, or hits a wall-clock cap, meters every paid generation call against the budget (once spent, paid calls are refused, though the model can keep editing with ffmpeg), and logs every model message, tool call, tool result, charge, and error. The agent's available tools are deliberately limited: plan (a no-op "think" scratchpad recording the model's reasoning between steps, alongside native reasoning enabled on both models), web_search, get_budget, generate_video and generate_image (budget-metered calls to any FAL or Replicate model), and run_command (arbitrary local shell commands, with viewFiles to let the model see extracted image frames). There are deliberately no dedicated ffmpeg/audio tools - part of the experiment is seeing whether a model figures out how to analyze and assemble media on its own.
Because a model can't hear the audio it's scoring shots against, optional context helps: --title/--artist/--about inject a plain-text song description identically into every agent's system prompt, and --transcript accepts a time-synced lyrics file (.lrc or timestamped .txt/.json) as ground-truth lyric timing, generated beforehand via forced alignment (e.g. WhisperX) or ASR. The default roster runs two agents, "Claude Fable 5" and "GPT-5.6 Sol" (edit src/config.ts to change it).
When to use - and when NOT to
Use Music Video Arena when you want to observe and compare how different LLM agents handle a genuinely open-ended, multi-tool, budget-constrained creative task - planning generation model choices, spending real money against a cap, recovering from failed generations, and assembling raw clips into a coherent final video - rather than scoring a narrow benchmark task. It's a fit for AI researchers and enthusiasts studying agentic tool-use and budget management, or anyone curious how current models compare on creative taste and media assembly.
It is not a fit for casual or unattended use: run_command executes arbitrary shell commands on your machine as directed by an LLM, so the source recommends running it only in an environment you're comfortable with and considering containerization before running untrusted models. Runs also spend real money on FAL/Replicate generation calls and LLM tokens, with best-effort budget accounting (unrecognized generation models fall back to a conservative per-second rate) - the source is explicit that the budget meter is a guardrail, not an exact invoice.
Inputs and outputs
Setup requires ffmpeg/ffprobe on PATH plus provider API keys in a .env file:
npm install
cp .env.example .env
Run with a song and budget:
npm start -- --song /path/to/song.mp3 --budget 25
Optional flags include --only <agent-key> (run a single agent), --max-steps <n> (cap the loop length), --title/--artist/--about (song context for the prompt), and --transcript <path> (time-synced lyric timing). Output for each agent lands in runs/<timestamp>/<model>/: workspace/output.mp4 (the final video), events.jsonl (a full structured log of every model action), transcript.md (a human-readable transcript), and summary.json (end-to-end time, generation spend, LLM token cost, token breakdown, output validation, per-generation-model spend, and tool/provider call counts). Setting per-model token prices in .env (SOL_IN_PER_1M/SOL_OUT_PER_1M, FABLE_IN_PER_1M/FABLE_OUT_PER_1M) enables dollar-denominated token cost reporting; without them, token counts are still recorded but tokenCostUsd is left null.
Integrations
The harness integrates with FAL and Replicate for on-demand video and image generation model calls (per-model pricing verified against fal.ai/pricing and replicate.com, tracking each provider's actual billing unit - per second, per video, per 1M video tokens, per megapixel, or per image), local ffmpeg/ffprobe for audio inspection and video assembly, a web-search tool for the agent to discover which generation models exist, and the Vercel AI SDK to drive the multi-step tool-calling agent loop across models.
Who it's for
AI researchers, tool builders, and enthusiasts who want to observe agentic LLM behavior on an open-ended, budget-constrained, multi-tool creative task rather than a narrow one-shot benchmark - specifically how models plan generation-model choices, spend money, recover from failures, and exercise creative taste when assembling a music video end to end. It is licensed under MIT.
Source README
Music Video Arena
An agentic "arena" where large language models compete to make the best music
video. Each model is handed a song, a hard USD budget, both a FAL and a
Replicate API key, a web-search tool, and a run_command tool with localffmpeg, then it iterates: research generation models, generate clips, edit
with ffmpeg, watch the result, and refine, until it produces a finaloutput.mp4 synced to the track.
The winner is judged subjectively by a human. The point is to watch how
different models plan, spend a budget, use tools, recover from failures, and
exercise taste, none of which a one-shot "build me an app" benchmark captures.
How it works
For each agent the harness:
- Creates an isolated workspace and copies the song into it.
- Runs a multi-step tool-calling loop (Vercel AI SDK) until the model stops,
hits the step cap, or the wall-clock cap. - Meters every paid generation call against the budget. Once the budget is
spent, paid calls are refused (the model can keep editing withffmpeg). - Logs every model message, tool call, tool result, charge, and error.
Tools available to the agent
plan- a no-op "think" scratchpad (à la Anthropic's think tool). Records the
model's plan/reasoning so it reflects between steps and we can see how it
reasoned. Native reasoning is also enabled on both models.web_search- look up which FAL/Replicate models exist and how to call them.get_budget- check remaining budget.generate_video- call any FAL or Replicate video model (budget-metered).generate_image- call any FAL or Replicate image model (budget-metered).run_command- run arbitrary local shell commands.ffmpeg/ffprobeare on
PATH; the model uses them to inspect audio, cut/concat clips, and mux the
final video. It can passviewFilesto see image frames it extracts.
We deliberately do not provide dedicated ffmpeg/audio tools, part of the
experiment is seeing whether a model figures out how to analyze and assemble
media on its own.
Setup
npm install
cp .env.example .env # then fill in keys
You also need ffmpeg and ffprobe on your PATH (brew install ffmpeg).
Run
npm start -- --song /path/to/song.mp3 --budget 25
Optional flags:
--only <agent-key>- run just one agent (e.g.claude-fable-5).--max-steps <n>- cap the agent loop length.--title/--artist/--about "..."- an optional song description injected
identically into every agent's system prompt. The model cannot hear the audio,
so a little context (title, artist, mood) produces far more coherent videos.
Omit these for a "blind" run where the model only has ffmpeg analysis to go on.--transcript <path>- an optional time-synced transcript (an.lrcor a
timestamped.txt/.json). It is copied into each workspace and injected into
the prompt as the ground-truth timing for lyrics. Since the model cannot hear
the audio, this is the reliable way for it to sync shots to specific lyrics.
Generating a transcript
The model can't hear the song, so precompute lyric timings and pass them with--transcript (same file for every agent = fair + reproducible). Best options:
- Forced alignment (most accurate) if you have the lyrics text, e.g.
WhisperX:whisperx song.mp3 --output_format lrc
(or align known lyrics with aeneas / Montreal Forced Aligner). - ASR with timestamps if you don't have lyrics: WhisperX / faster-whisper (less
accurate on music, but no lyrics needed). - An existing synced-lyrics
.lrcfor popular tracks.
npm start -- --song ~/Downloads/music_video_arena.mp3 --budget 25 \
--title "Uptown Funk" --artist "Mark Ronson ft. Bruno Mars" \
--about "Upbeat retro funk-pop, ~115 BPM, flashy and fun. Think slick 70s/80s style, gold chains, dancing, bright colors, swagger." \
--transcript ~/Downloads/uptown-funk.lrc
Outputs land in runs/<timestamp>/<model>/:
workspace/output.mp4- the final music videoevents.jsonl- full structured log of everything the model didtranscript.md- human-readable transcriptsummary.json- end-to-end time, cost (generation spend + LLM token cost +
total), token breakdown, output validation (duration/resolution/audio), a
per-generation-model spend breakdown, and tool/provider call counts
Token-cost accounting
To report the LLM token cost in dollars, set per-model prices in .env
(SOL_IN_PER_1M / SOL_OUT_PER_1M, FABLE_IN_PER_1M / FABLE_OUT_PER_1M).
Without them the summary still records token counts but leaves tokenCostUsd
null.
Pilot
The default config runs two agents: Claude Fable 5 and GPT-5.6 Sol. Editsrc/config.ts to change the roster.
Important disclaimers
- Music licensing. Only use songs you have the right to use (your own,
Creative Commons, royalty-free, licensed, or AI-generated). Do not commit
copyrighted audio or publish videos you do not have rights to. - Cost. These runs spend real money on FAL/Replicate and on LLM tokens
(agent transcripts plus image frames add up fast). Set a conservative--budget, start with one model, and watch the logs. Budget accounting is
best-effort (see below), treat it as a guardrail, not an invoice. - Security.
run_commandexecutes arbitrary shell commands on your machine
as directed by an LLM. Run only in an environment you are comfortable with;
containerization is recommended before running untrusted models.
On budget accuracy
Because the model may pick any FAL/Replicate model, exact per-call pricing is
not always knowable up front. src/pricing.ts holds per-model rates verified
against fal.ai/pricing and replicate.com (with the correct billing unit, per
second, per video, per 1M video tokens, per megapixel, or per image) and reads
the request's resolution/duration so estimates track reality. Unrecognized
models fall back to a conservative per-second rate. Prices drift, so re-check the
provider's model page; treat the meter as a guardrail, not an exact bill. Update
the tables in src/pricing.ts when rates change.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.