lyric-video
Turn a song, a cover image and (optionally) plain lyrics text into a finished lyric video — no SRT needed, timings are generated automatically with offline speech recognition and fuzzy alignment that tolerates typos in the lyrics. Two looks: Spotify "now playing" and cinematic motivational (Kalam Hindi font, word highlight). Use when the user asks for a lyric video, karaoke video, Spotify-style lyrics edit, or a motivational lyrics reel.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/cybergaurav404--lyric-video-skill)HTML
<a href="/listings/cybergaurav404--lyric-video-skill"><img src="/api/listings/cybergaurav404--lyric-video-skill/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
git clone https://github.com/CyberGaurav404/lyric-video-skill
cd lyric-video-skill
pip install pillow imageio-ffmpeg vosk # ffmpeg ships with imageio-ffmpeg
python scripts/make_video.py \
--audio song.mp3 \
--cover cover.png \
--lyrics lyrics.txt \
--title "Song Name" --artist "Artist Name" \
--style spotify \
--out lyric_video.mp4One command does everything: speech recognition → alignment with your lyrics → SRT → chunked render → concatenation → `lyric_video.mp4`.
Common variants
# 20 second teaser
python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt \
--start 9.6 --duration 20 --out teaser.mp4
# cinematic style with your own background plate (no text in it)
python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt \
--style cinematic --bg plate.png --out video.mp4
# no lyrics file at all — the recogniser writes the text too
python scripts/make_video.py --audio song.mp3 --cover art.png --out video.mp4
# English song
python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt --lang en---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 88 lines
- ---
- name: lyric-video
- description: >
- Turn a song, a cover image and (optionally) plain lyrics text into a finished lyric
- video — no SRT needed, timings are generated automatically with offline speech
- recognition and fuzzy alignment that tolerates typos in the lyrics. Two looks:
- Spotify "now playing" and cinematic motivational (Kalam Hindi font, word highlight).
- Use when the user asks for a lyric video, karaoke video, Spotify-style lyrics edit,
- or a motivational lyrics reel.
- ---
- # Lyric Video skill
- **Input the user gives you:** an audio file, a cover image, and the lyrics as plain text
- (optional). **You deliver:** one finished `.mp4`. The user never has to supply an SRT —
- `auto_srt.py` builds it from the audio.
- ## Do this
- ```bash
- pip install pillow imageio-ffmpeg vosk # ffmpeg ships with imageio-ffmpeg
- python scripts/make_video.py \
- --audio song.mp3 --cover cover.png --lyrics lyrics.txt \
- --title "Song Name" --artist "Artist Name" \
- --style spotify --out lyric_video.mp4
- ```
- That single command: recognises speech → aligns the user's lyrics to it → writes the SRT →
- renders the video in chunks → concatenates → writes `lyric_video.mp4`.
- - `--style spotify` (default) — blurred cover background, album card, progress bar,
- smoothly scrolling lyrics.
- - `--style cinematic` — full-bleed background (pass `--bg plate.png`, or one is generated),
- 2.35:1 letterbox, Kalam font, word-by-word highlight.
- - `--start 9.6 --duration 20` — teaser clip.
- - No cover? One is generated from the title. No lyrics? ASR text is used.
- ## Inputs, and what to do when they are missing
- | Input | Notes | If missing |
- |---|---|---|
- | Audio | mp3 / m4a / wav | required — ask for it |
- | Cover | square ≥1000×1000 | generated procedurally; or make one in Figma (`generate_image`, prompt in PROMPTS.md) |
- | Lyrics text | plain text, one line per lyric line | ASR text is used, timings still automatic |
- | Title / artist | text | inferred from the cover or left generic |
- | Language | `--lang hi` (default) or `en` | pick from the lyrics script |
- Typos are expected and handled: both sides are normalised (punctuation, nukta, case) and
- words are matched with a fuzzy ratio, so "कोलम्बस" vs "कोलंबस" or "आईंस्टीन" vs "आइंस्टाइन"
- still line up. Words that cannot be matched get interpolated between their neighbours.
- ## Pipeline (what the scripts do)
- 1. `auto_srt.py` — decodes audio to 16 kHz PCM, runs Vosk (offline, downloads a ~40–80 MB
- model once), optionally constrains decoding with the user's lyric lines as a grammar,
- aligns them with `difflib` + fuzzy matching, and writes one SRT cue per lyric line.
- 2. `spotify_lyrics.py` / `motivational_render.py` — render frames with Pillow, pipe raw
- frames into ffmpeg.
- 3. `make_video.py` — chunks the render (45 s per chunk by default, keeps memory < 2 GB),
- concatenates with `ffmpeg -f concat -c copy`.
- ## Quality bar
- - Continuous motion, never stepped: interpolate the camera/scroll per frame.
- - Active line bigger and brighter; neighbours shrink and dim in tiers.
- - Auto-shrink long lines to a safe width; never clip text at the frame edge.
- - Correct font per script: Devanagari lines need a Devanagari font (bundled in
- `assets/fonts/`), Latin lines need a Latin font. Never mix them in one string.
- - One idea per frame: either the background moves or the text moves, not both hard.
- ## Verify before delivering
- ```bash
- ffmpeg -ss 12 -i out.mp4 -frames:v 1 check.jpg # 2–3 spots
- ```
- Check: no clipped lines, one active line, no tofu/boxes (font problem), progress time
- correct, audio in sync, bars/grade consistent.
- ## Pitfalls
- | Symptom | Cause | Fix |
- |---|---|---|
- | Boxes instead of text | wrong font for the script | use `font_for(text, …)`; Devanagari fonts are in `assets/fonts/` |
- | `mkl_malloc: failed to allocate memory` | 2 GB RAM + big model/audio | Vosk (used here) avoids this; if using whisper, chunk to 8–10 s |
- | ffmpeg `Cannot allocate memory` | too many frames in flight | `--chunk 40`, `-threads 2`, `rc-lookahead=4` |
- | Lyrics drift over time | alignment failed on a long instrumental gap | pass `--lyrics`; keep one lyric line per line of text |
- | Background jumps | pre-rendered keyframes swapped, not blended | the bundled renderers blend/interpolate |
README.md · README · 126 lines
- # lyric-video-skill
- Turn **a song + a cover image + lyrics text** into a finished lyric video.
- No SRT needed — timings are generated automatically, and typos in the lyrics are tolerated.
- | Spotify "now playing" | Cinematic motivational |
- |---|---|
- |  |  |
- ---
- ## Quick start
- ```bash
- git clone https://github.com/CyberGaurav404/lyric-video-skill
- cd lyric-video-skill
- pip install pillow imageio-ffmpeg vosk # ffmpeg ships with imageio-ffmpeg
- python scripts/make_video.py \
- --audio song.mp3 \
- --cover cover.png \
- --lyrics lyrics.txt \
- --title "Song Name" --artist "Artist Name" \
- --style spotify \
- --out lyric_video.mp4
- ```
- One command does everything: speech recognition → alignment with your lyrics → SRT →
- chunked render → concatenation → `lyric_video.mp4`.
- ### Common variants
- ```bash
- # 20 second teaser
- python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt \
- --start 9.6 --duration 20 --out teaser.mp4
- # cinematic style with your own background plate (no text in it)
- python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt \
- --style cinematic --bg plate.png --out video.mp4
- # no lyrics file at all — the recogniser writes the text too
- python scripts/make_video.py --audio song.mp3 --cover art.png --out video.mp4
- # English song
- python scripts/make_video.py --audio song.mp3 --cover art.png --lyrics lyrics.txt --lang en
- ```
- ---
- ## Why no SRT?
- Hand-timed subtitles are the slowest part of making a lyric video, and agents usually
- cannot ask the user to produce them. `scripts/auto_srt.py` closes that gap:
- 1. **Offline ASR (Vosk)** — fast, no GPU, ~40–80 MB model downloaded once.
- 2. **Grammar hint** — when lyrics text exists, its lines are fed to the recogniser as a
- grammar, so it prefers the words you actually wrote.
- 3. **Fuzzy alignment** — both sides are normalised (punctuation, nukta, case) and matched
- with `difflib` plus a similarity ratio, so `कोलम्बस`/`कोलंबस` or `आईंस्टीन`/`आइंस्टाइन`
- still line up.
- 4. **Interpolation** — anything still unmatched is spread proportionally between its
- matched neighbours, so timing never collapses.
- 5. **One cue per lyric line** — start = first word, end = last word.
- Want the SRT on its own?
- ```bash
- python scripts/auto_srt.py --audio song.mp3 --lyrics lyrics.txt --out song.srt --lang hi
- ```
- ---
- ## What's inside
- ```
- SKILL.md agent-facing skill definition (when/how to use)
- README.md this file
- PROMPTS.md copy-paste prompts for new chats
- briefs/Lyric_Video_Brief.md design spec + self-contained renderer
- scripts/
- make_video.py end-to-end orchestrator (audio+cover+lyrics -> mp4)
- auto_srt.py audio (+ lyrics text) -> timed .srt
- spotify_lyrics.py Spotify "now playing" renderer
- motivational_render.py cinematic renderer (Kalam font, word highlight)
- cover_art.py procedural album cover (--title/--artist/--out)
- gen_bg2.py procedural cinematic background
- bake_bg.py bloom + teal-orange grade + vignette
- assets/
- fonts/ Kalam Bold + Noto Sans Devanagari (Bold/Regular)
- The_Spectre_Cover_Art.png sample cover
- Motivational_Background.png sample plate
- examples/ sample SRTs + a lyrics .txt
- docs/ preview frames
- ```
- ---
- ## Design tokens (Spotify style)
- | Element | Value |
- |---|---|
- | Canvas | 1920×1080, 30 fps, h264 CRF 19, AAC 192k |
- | Background | cover 1.25×, 58 px blur, 66% dark overlay |
- | Album card | 600×600 at (150,120), radius 18, shadow blur 22 |
- | Title / artist | bold 40 px white / 30 px `#9698A4` |
- | Progress | track `#50525C` 4 px, fill `#F0C05A`, knob 12 px |
- | Lyrics | column x=1370, active line y=520 |
- | Type scale | active 54 px bold, ±1 42, ±2 38, ±3 34; spacing 104 px |
- | Scroll | `scroll = (i-1) + smoothstep((t - lineStart + 0.30)/0.60)` |
- Cinematic style: full-bleed plate, 2.35:1 bars, bloom/halation, teal-orange grade,
- slow continuous push-in, lyrics bottom-centre in Kalam Bold with word-by-word gold highlight.
- ---
- ## Requirements & performance
- - Python 3.10+, `pillow`, `imageio-ffmpeg`, `vosk` (system `ffmpeg` also works)
- - Rendering is CPU-bound: ~1.7 s of render time per second of video at 1080p30 on two
- cores; `make_video.py` chunks automatically to stay under 2 GB RAM.
- - First run downloads the speech model into `models/` (git-ignored).
- ## License
- MIT — see [LICENSE](LICENSE).
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.