LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Script to copy AND encode Audio CD (https://www.linuxquestions.org/questions/linux-software-2/script-to-copy-and-encode-audio-cd-363876/)

squabsy 09-16-2005 04:58 AM

Script to copy AND encode Audio CD
 
I am trying to write a script that will copy a cd then encode it (eith Ogg or Lame) into fully tagged indivudual track files.
I have so far after some research written a script that uses cdrao to query cddb and rip a .bin and .toc file then burn said file back to a blank cdr - great exact audio copying achieved.
I now want to extend the script to (preferably without re-ripping) split the bin file using the toc into individual tracks and encode and tag them (either with oggenc or Lame I don't mind). But am struggling. Has anyone got any suggestions. (I am happy to try and write the script myself but don't know where to start).

Andrew Benton 09-16-2005 05:30 AM

I usually rip cd's with cdparanoia then encode it with oggenc. I've not found a way to automate filling in the track names. This one is for the Simple Minds CD `Sparkle In The Rain. For a different CD fill in the appropriate track names.
Code:

#!/bin/bash
rm -rf simple-minds-ogg &&
mkdir simple-minds-ogg &&
cd simple-minds-ogg &&
TRACK_NUMBER=0 &&
rip()
{
        let "TRACK_NUMBER += 1" &&
        cdparanoia $TRACK_NUMBER &&
        oggenc cdda.wav -b 256 -o "Simple Minds - $1.ogg" &&
        rm -f cdda.wav
}
rip "Up On The Catwalk" &&
rip "Book Of Brilliant Things" &&
rip "Speed Your Love To Me" &&
rip "Waterfront" &&
rip "East At Easter" &&
rip "Street Hassle" &&
rip "White Hot Day" &&
rip "C Moon Cry Like A Baby" &&
rip "The Kick Inside Of Me" &&
rip "Shake Off The Ghosts" &&
echo "done"


squabsy 09-16-2005 05:44 AM

Thanks for the suggestion. But what I really want to do is use the info that cdrdao has pulled down from cddb into the toc file to do the naming/tagging. Does anyone know a way to script this ?

squabsy 09-20-2005 03:33 AM

Any ideas please ?


All times are GMT -5. The time now is 11:22 PM.