shell-scripts/album-art
2024-03-07 12:09:22 -06:00

9 lines
289 B
Bash
Executable file

#!/bin/sh
cover="cover.jpg"
for file in *.flac; do
ffmpeg -i "$file" -i "$cover" -map 0:a -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic "temp-$file"
# Replace old file with new file
mv "temp-$file" "$file"
done