Skip to content

About

A script to embed lyrics in audio files

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

embed_lyrics

A zsh script that embeds .lrc (synced lyrics) files directly into audio file metadata, in a completely lossless way.

Particularly useful for making lyrics compatible with beets and other tools that don't support standalone .lrc files.


Dependencies

  • ffmpeg — embedding for mp3, m4a, ogg, opus, wav, aiff
  • flac (metaflac) — native lossless embedding for FLAC files

Install via Homebrew:

brew install ffmpeg flac

Installation

chmod +x embed_lyrics.sh
mv embed_lyrics.sh /usr/local/bin/embed_lyrics

The script is then available from any directory.


Usage

# Current directory (recursive)
embed_lyrics

# Specified directory
embed_lyrics ~/Music
embed_lyrics /Volumes/NAS/Albums

Behaviour

The script recursively scans the target directory and, for each audio file found, checks whether a .lrc file with the same name exists in the same folder.

Artist - Album/
├── 01 - Track.flac   ← audio file
├── 01 - Track.lrc    ← will be embedded then deleted
├── 02 - Track.flac
└── ...               ← no .lrc → silently skipped
  • ✅ Successful embed → the .lrc file is deleted
  • ❌ Failure → the .lrc file is kept and an error is displayed

Supported formats

Format Method Re-encoding
.flac metaflac (LYRICS tag) ❌ No
.mp3 ffmpeg -c copy ❌ No
.m4a ffmpeg -c copy ❌ No
.ogg ffmpeg -c copy ❌ No
.opus ffmpeg -c copy ❌ No
.wav ffmpeg -c copy ❌ No
.aiff / .aif ffmpeg -c copy ❌ No

Audio quality is always preserved — only metadata is modified.


Sample output

[INFO]  Scanning: /Users/you/Music
[INFO]  Embedding: 01 - Song.lrc → 01 - Song.flac
[OK]    Done → 01 - Song.flac
[INFO]  Embedding: 02 - Other.lrc → 02 - Other.flac
[OK]    Done → 02 - Other.flac

[INFO]  ────────────────────────────────
[OK]    Embedded : 2 file(s)
[INFO]  ────────────────────────────────

About

A script to embed lyrics in audio files

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages