dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit f18701c660bb1f24e34065b4542958c97ceb16ff
parent e62acb2398f5ed37c39097ac57d1aa68a4084564
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sun,  6 Sep 2020 19:57:47 +0200

Support ripping to flac

Diffstat:
M.local/bin/rip-audio-cd.sh | 16+++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/.local/bin/rip-audio-cd.sh b/.local/bin/rip-audio-cd.sh @@ -44,9 +44,19 @@ for f in *.wav; do i="$(echo "$track" | sed 's/^0//')" title="$(printf "%s" "$cddbinfo" | grep " $i " | sed 's/.*[0-9] //')" fout="${track} ${artist} - ${title}.${format}" - ffmpeg -i "$f" -vn -ar 44100 -ac 2 -ab 192k "$fout" - id3tag --artist="$artist" --album="$album" --song="$title" --track="$track"\ - "$fout" + if [ "$format" = flac ]; then + flac "$i" + metaflac \ + --set-tag=ARTIST="$song" \ + --set-tag=ALBUM="$album" \ + --set-tag=TITLE="$title" \ + --set-tag=TRACKNUMBER="$track" \ + "$fout" + else + ffmpeg -i "$f" -vn -ar 44100 -ac 2 -ab 192k "$fout" + id3tag --artist="$artist" --album="$album" --song="$title" --track="$track"\ + "$fout" + fi done rm ./track*.wav