Sponsored Content
Full Discussion: Music cd burn
Top Forums Shell Programming and Scripting Music cd burn Post 302121187 by bog333 on Tuesday 12th of June 2007 09:52:51 AM
Old 06-12-2007
Music cd burn

Allo.
I do a program using shell script to burn cds and dvds because I don't want to install one with kde or gnome dependance. I want to optimize one of my shell script. this shell script is to burn music cds. I juste have to go in shell and write :
burn_cd_music audio1.mp3 audio2.mp3 audio1.ogg audio1.wav
and the shell script copy file in /tmp/cd_temp, converte them in .wav and burn the cd. It's fonctionnal, but I don't want to have temporary file.....
Can I use pipe or buffer to do that, and how?
Sorry for my english, if you don't understand, I will try to better explain


Give me you ideas
My script is:
#!/bin/bash
#do a liste of the mp3 files and one for the ogg file
for i in $@
do
j=`echo $i | cut -f2 -d '.'`
if test $j = 'ogg'
then
list1="$list1 $i"
fi
if test $j = 'mp3'
then
list2="$list2 $i"
fi
done

#copy the file in /tmp/cd_temp (I don't want to do this)
mkdir /tmp/cd_temp
for i in $@
do
cp $i /tmp/cd_temp/
done

#go at the files directory
cd /tmp/cd_temp

#convert the ogg file in wav file
for i in list1
do
sox `basename $i .ogg`.ogg `basename $i .ogg`.wav
rm `basename $i .ogg`.ogg
done

#convert the mp3 file in wav file
for i in list2
do
mpg123 -w `basename $i .mp3`.wav $i
rm `basename $i .mp3`.mp3
done

#burn CD
cdrecord dev=ATA:0,0,0 -eject speed=2 -pad -audio *.wav

#erase the temporary file
rm -r /tmp/cd_temp/
 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

burn cdrom with solaris

Hallo, who can help me to configure a scsi cd writer to my sun server enterprice 1000. 1. Hardware configuration 2. Burn program etc.. Please send me links or dokuments were i can get more infos about this theme. regards joerg (1 Reply)
Discussion started by: joerg
1 Replies

2. BSD

how to burn these files...?

How shall i burn these files?? cause i dont want to use about 200 MB on 1 cd.. so can i write these three files "bootonly,disk2 & miniinst" into 1 cd?? (4 Replies)
Discussion started by: D-iew
4 Replies

3. OS X (Apple)

burn clarification procedure

without having to write a mini series novel. i have read the disk utility / help / burn, innuendo solution. would the correct procedure to burn a Linux Mint Installation DVD/CD onto a USB device be: 1- select the CD/DVD. 2- click burn 3 - in the pop up window that follows choose the USB... (1 Reply)
Discussion started by: cowLips
1 Replies
oggdec(1)							   Vorbis Tools 							 oggdec(1)

NAME
oggdec - simple decoder, Ogg Vorbis file to PCM audio file (Wave or RAW). SYNOPSIS
oggdec [ -Qhv ] [ -b bits_per_sample ] [ -e endianness ] [ -R ] [ -s signedness ] [ -o outputfile ] file ... DESCRIPTION
oggdec decodes Ogg Vorbis files into PCM-encoded ("uncompressed") audio files, either Wave or RAW format. For each input file, oggdec writes to a filename based on the input filename, but with the extension changed to ".wav" or ".raw" as appro- priate. If the input file is specified as - , then oggdec will read from stdin, and write to stdout unless an output filename is specified. Like- wise, an output filename of - will cause output to be to stdout. Writing Wave format to stdout is a bad idea. Wave requires a seekable medium for the header to be rewritten after all the data is written out; stdout is not seekable. OPTIONS
-Q, --quiet Suppresses program output. -h, --help Print help message. -V, --version Display version information. -b n, --bits=n Bits per sample. Valid values are 8 or 16. -e n, --endian=n Set endianness for 16-bit output. 0 (default) is little-endian (Intel byte order). 1 is big-endian (sane byte order). -R, --raw Output in raw format. If not specified, writes Wave file (RIFF headers). -s n, --sign=n Set signedness for output. 0 for unsigned, 1 (default) for signed. -o filename, --output=filename Write output to specified filename. This option is only valid if one input [file] is specified, or if raw mode is used. EXAMPLES
Decode a file enabler.ogg to enabler.wav as little-endian unsigned 16-bit (default options): oggdec enabler.ogg Decode a file enabler.ogg to enabler.raw as headerless little-endian unsigned 16-bit: oggdec --raw=1 enabler.ogg Decode enabler.ogg to enabler.crazymonkey as unsigned 8-bit: oggdec -b 8 -s 0 -o enabler.crazymonkey enabler.ogg Decode enabler.ogg to enabler.raw as big-endian signed 16-bit (any of the following): oggdec -R -e 1 -b 16 enabler.ogg oggdec -R -e 1 -b 16 -o enabler.raw - < enabler.ogg oggdec -R -e 1 -b 16 - < enabler.ogg > enabler.raw Mass decoding (foo.ogg to foo.wav, bar.ogg to bar.wav, quux.ogg to quux.wav, etc.): oggdec *.ogg AUTHORS
Program Authors Michael Smith <msmith@xiph.org> Manpage Authors Frederick Lee <phaethon@linux.ucla.edu>, assisted by a few million monkeys armed with keyboards in irc://irc.openprojects.net/#vorbis SEE ALSO
ogg123(1), oggenc(1), vorbiscomment(1), flac(1), speexdec(1) Xiph.Org Foundation 2008 September 9 oggdec(1)
All times are GMT -4. The time now is 06:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy