From 6a0bf13ac2c7eb6ca32b1f13a8b7d707e406020f Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 21 Oct 2013 00:22:04 +0200 Subject: [PATCH] =?utf8?q?Aucun=20souvenir=20de=20d'o=C3=B9=20=C3=A7a=20vi?= =?utf8?q?ent,=20mais=20=C3=A7a=20marche.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- flac2mp3.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 flac2mp3.sh diff --git a/flac2mp3.sh b/flac2mp3.sh new file mode 100755 index 0000000..0a88ee3 --- /dev/null +++ b/flac2mp3.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +# Convertit tous les flac dans le dossier en mp3 + +for a in *.flac; do + OUTF=${a%.flac}.mp3 + + ARTIST=$(metaflac "$a" --show-tag=ARTIST | sed s/.*=//g) + TITLE=$(metaflac "$a" --show-tag=TITLE | sed s/.*=//g) + ALBUM=$(metaflac "$a" --show-tag=ALBUM | sed s/.*=//g) + GENRE=$(metaflac "$a" --show-tag=GENRE | sed s/.*=//g) + TRACKNUMBER=$(metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g) + DATE=$(metaflac "$a" --show-tag=DATE | sed s/.*=//g) + + flac -c -d "$a" | lame -m j -q 0 --vbr-new -V 0 -s 44.1 - "$OUTF" + id3 -t "$TITLE" -T "${TRACKNUMBER:-0}" -a "$ARTIST" -A "$ALBUM" -y "$DATE" -g "${GENRE:-12}" "$OUTF" +done + -- 2.39.2