diff --git a/mp32cda b/mp32cda new file mode 100755 index 0000000..688af8a --- /dev/null +++ b/mp32cda @@ -0,0 +1,48 @@ +#!/bin/sh + +set -x + +# Generate cdrdao-toc-file from an directory with mp3-files +# and decode mp3 files to wav + +# Variables +. /etc/dvd-scripts.env + +burndir=/dat/tmp/burn # Directory, where all the file are put in +list=$burndir/list.txt # File +toc=$burndir/cd.toc # cdrdao-toc-file +cdspeed=24 # Writespeed of CD-Writer +cddriver=generic-mmc-raw +ScriptDir=/usr/local/src/scripts +mp3id2toc=mp3id2toc # program, that generates the toc from the id-tags +mp32wav=mp32wav # program, that decodes the mp3 files to wav + +[ -d "$burndir" ] || mkdir "$burndir" +rm "$burndir"/* + +# check if a parameter for directory with source files is there +mp3dir=. +[ -d "$1" ] && mp3dir="$1" + + +# generate toc file with cd-text from id-tags for cddao +$mp3id2toc "$toc" "$mp3dir" + + +# convert mp3-files to wave format +echo " +Die mp3-files werden in dieser Reihenfolge decodiert und +auf die CD gebrannt. " +$mp32wav "$mp3dir" "$burndir" + +# Write the wav-files to the cd +cd $burndir +cat $toc + +#cdrdao write --simulate --device $CD_DEVICE_SCSI --speed $cdspeed --driver $cddriver -v 3 -n $toc +cdrdao write --device $CD_DEVICE --speed $cdspeed --driver $cddriver -v 3 -n $toc + +#rm $list +#rm $toc + +eject