feat(audio): embedd album artwork into MP3 files

Add script for attaching cover art to MP3 files using ffmpeg
or lame.

- Support batch processing of all MP3 files in a directory
- Support updating individual MP3 files
- Embed front-cover artwork from a supplied image
- Preserve existing audio streams when using ffmpeg
- Write ID3v2.3-compatible cover metadata
- Replace original files with updated tagged versions
- Add usage examples and script documentation
- Simplify album artwork management for music collections

ads
This commit is contained in:
Lucas Vivohost committed 2026-09-14 12:43:38 +02:00
1 parent 8d98c134d0
commit 3203817e51
2 files changed
+105 -20

No files matched your search

-20
View File
@@ -1,20 +0,0 @@
FFMPEG="true"
if [ "$2" == "" ]; then
for file in *mp3; do
if [[ "${FFMPEG}" == "true" ]]; then
ffmpeg -i "$file" -i /home/lucas/Downloads/$1 -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "$file.mp3"
else
lame --ti /home/lucas/Downloads/$1 "$file"
fi
mv "$file.mp3" "$file"
done
else
for file in "$2"; do
if [[ "${FFMPEG}" == "true" ]]; then
ffmpeg -i "$file" -i /home/lucas/Downloads/$1 -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "$file.mp3"
else
lame --ti /home/lucas/Downloads/$1 "$file"
fi
mv "$file.mp3" "$file"
done
fi