Purpose: music-video-cli is aimed at musicians and AI music creators making music videos for their songs, providing a set of small local tools covering song analysis, beat-synced shot planning, and Spotify Canvas creation.
Main capabilities:
- Song analysis: detects BPM, musical key, Camelot code, beat and bar lengths, and finds the highest-energy 15-second and 30-second windows, usually corresponding to the chorus or drop, suitable for TikTok, Reels, and Shorts.
- Beat-synced shot list: generates a shot list so that every cut point falls on a bar line, and provides a visual idea for each section.
- Spotify Canvas creation: converts video clips or still images into 3-to-8-second, 1080x1920 silent MP4s.
- Platform spec reference: provides aspect ratio, resolution, duration, and format information for TikTok, Instagram Reels, YouTube Shorts, YouTube, and Spotify Canvas.
How to use: the tool runs in two forms, as a CLI and as an MCP server. As an MCP server, MCP clients such as Claude, Cursor, and Windsurf can call it to analyze songs and plan videos. Running it requires Node.js 18+ and ffmpeg (installable via brew install ffmpeg, winget install ffmpeg, or sudo apt install ffmpeg); if ffmpeg is not in PATH, set FFMPEG_PATH. MCP client configuration examples include Claude Desktop's claude_desktop_config.json and Cursor's .cursor/mcp.json. Example prompts such as "Analyze ~/Music/demo.mp3 and tell me which 15 seconds to use for TikTok.", "Plan a 16:9 music video for this song with a cut on every bar in the chorus.", "Make a Spotify Canvas from the first 6 seconds of ~/Videos/teaser.mov.".
Technical notes: BPM detection uses a spectral-flux onset envelope, autocorrelation, and scores half-speed and double-speed together, reporting 70 to 180 BPM by default (adjustable via minTempo / maxTempo); key detection uses a chromagram from a short-time FFT, matched against Krumhansl-Kessler major and minor profiles; highlight segments are selected by RMS energy as the loudest sustained window. These results are estimates; if the song has tempo changes or a loose rhythm, it is recommended to verify the BPM with tap tempo.
Use cases: picking song highlights for short-video platforms, planning beat-aligned music video shot lists, making Spotify Canvas looping clips, and having AI agents assist with the above via an MCP client.
Limitations: all processing is done locally via ffmpeg, with no account, API key, or data upload required; analysis results are estimates. The material does not provide information on pricing, cost, or performance guarantees.