Grip Multiple EncodeIntroductionEver wanted to make lossy (e.g. MP3) and lossless (e.g. FLAC) versions of the same CD without having to rip the cd twice? And still keep the correct id3 tags? Or do you want to have two different lossy versions (e.g. one with 256kbit/s and one with 128kbit/s)? I had the same problem and solved it using RequirementsYou need:
If you run Debian, you can do this: apt-get install grip lame flac id3v2 And you should be set... :) Shell script encode.sh
#!/bin/bash
# author: nicola fankhauser (nicola.fankhauser@variant.ch)
# date: 09.11.2003
# license: GPL
#
# about: encodes one wavefile to multiple versions
# (here to MP3 and FLAC)
#
# Command line arguments (first is $1, second $2 etc.)
WAVSOURCE=$1
DESTINATION=$2
TITLE=$3
ARTIST=$4
ALBUM=$5
YEAR=$6
TRACK=$7
GENRE=$8
echo $WAVSOURCE > ~/wavsource
echo $DESTINATION > ~/destination
# MP3 encoding
MP3ENC="lame -q0 -b 256 -V0 - -"
echo $MP3ENC
cat "$WAVSOURCE" | $MP3ENC > "$DESTINATION.mp3" 2> ~/lame_error
# set id3 tag
id3v2 --song "$TITLE" --artist "$ARTIST" \
--album "$ALBUM" --year $YEAR \
--track $TRACK --genre "$GENRE" "$DESTINATION.mp3"
# FLAC encoding
FLACENC="flac --best - "
echo $FLACENC
cat "$WAVSOURCE" | $FLACENC > "$DESTINATION.flac" 2> ~/flac_error
# set id3 tag
id3v2 --song "$TITLE" --artist "$ARTIST" \
--album "$ALBUM" --year $YEAR \
--track $TRACK --genre "$GENRE" "$DESTINATION.flac"
Grip configurationNow you have to configure Grip: Go to Config->Encode and select other as encoder. Set the fields below:
How to use itYou only need to rip the CD like you are used to - Grip and encode.sh do the rest! In case it does not work correctly, you can inspect these logfiles created by encode.sh: ~/wavsource ~/destination ~/lame_error ~/flac_error Alternatively, you can start encode.sh on the shell to see what it is doing. If you have any comments on this script, please © Copyright 2004 - 2006 Nicola Fankhauser. All Rights Reserved. |