Simple flac2mp3 using metaflac, lame and id3.

#!/bin/bash

find . -type f -name "*.flac" -print0 | while read -d $'\0' a

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

 

Comments  

#3 profile6560 2018-11-02 12:45
Need cheap hosting? Try webhosting1st, just $10 for an year.

http://www.ainagri.com/images/photos/1664/5/0f3c9099a315cbe8c6d7e8d8.jpg
Quote
#2 profile6827 2018-11-01 13:52
Need cheap hosting? Try webhosting1st, just $10 for an year.

http://433.himoza.org/public/img-1539196527.jpg
Quote
#1 profile1949 2018-11-01 13:07
Need cheap hosting? Try webhosting1st, just $10 for an year.

http://www.huntingbook.org/images/photos/1291/989/1eab72f455e033f209f7dd9c.jpg
Quote

Add comment

Security code
Refresh