SuperAPIAI Directory

music-video-cli

github.com · AI audio

music-video-cli is an open-source local toolkit for musicians and AI music creators, offered in two forms: a command-line interface (CLI) and an MCP server. It can analyze a song's BPM, key, Camelot code, beat and bar lengths, and find the highest-energy 15-second and 30-second segments; it can generate a shot list with cut points aligned to bars; and it can turn video clips or still images into 3-to-8-second silent 1080x1920 Spotify Canvas MP4s. The tool includes built-in platform spec references for TikTok, Instagram Reels, YouTube Shorts, YouTube, and Spotify Canvas. All processing is done locally via ffmpeg, with no account or API key required, and no data is uploaded.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

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:

  1. 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.
  2. 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.
  3. Spotify Canvas creation: converts video clips or still images into 3-to-8-second, 1080x1920 silent MP4s.
  4. 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.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools