The lrcput.py
script allows you to embed LRC (Lyrics) files into both FLAC and MP3 audio files. It supports specifying a directory containing the audio files and their corresponding LRC files with the same name.
this script was designed to embed lyrics acquired from lrcget
- Python 3.x
- Required Python libraries (install using
pip install
):- mutagen
- eyed3
- tqdm (for progress bar)
-
Place your audio files (FLAC or MP3) and their corresponding LRC files in the same directory.
-
Open a terminal or command prompt.
-
Navigate to the directory where the script
lrcput.py
is located. -
Run the script with the following command to embed LRC files and optionally reduce (delete) them:
python lrcput.py -d "path/to/your/directory" -s -r
Replace "path/to/your/directory" with the actual path to the directory containing your audio and LRC files.
-d or --directory: Specify the directory containing audio files and LRC files.
-s or --skip: Optional. Skip files that already have embedded lyrics.
-r or --reduce: Optional. Reduce (delete) LRC files after embedding.
-R or --recursive: Optional. Recursively process subdirectories
Suppose you have the following directory structure:
|-- song1.flac
|-- song1.lrc
|-- song2.mp3
|-- song2.lrc
|-- ...
To embed LRC files into the audio files and delete them after embedding, navigate to the script's directory and run the following command:
python lrcput.py -d "path/to/audio_directory" -s -r
-
The LRC files should have the same name astheir corresponding audio files, but witha .lrc extension.
-
You can modify the script's options andbehavior by editing the script directly.
-
Make sure to backup your original audiofiles before running the script.
This script utilizes the mutagen and eyed3 libraries for working with audio and metadata.