Operating Systems > Linux and UNIX

Converting multiple files to mp3

<< < (3/6) > >>

flap:
Actually a better solution again would be:

find -name "*.wav" | while read item; do oggenc "$item" -o "${item/.wav/}.ogg";done

voidmain:
How can anyone not like a thread like this.  

Master of Reality:
would this work?
I just modified a script i had for converting things to thingers.

--- Code: ---
--- End code ---

[ January 28, 2003: Message edited by: The Master of Reality / Bob ]

flap:
Try it.

No it won't, btw.

This bit

#replace spaces with underscores
for i in *.wav; do mv "$i" `echo $i | tr ' ' '_'`; done

won't work, for reasons stated above.

voidmain:
Actually the spaces are a problem in the lame command, not the "for" loop. This works for me:

$ for i in *.[Ww][Aa][Vv]; do lame --preset extreme "$i" "${i%%.[Ww][Aa][Vv]}.mp3"; done

Which also accounts for case. The quotes should fix the problem with spaces in the parameters for lame.

[ January 28, 2003: Message edited by: void main ]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version