Skip to content
Back to search

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.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cybergaurav404--lyric-video-skill/badge.svg)](/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

i

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.mp4

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

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.