Re: [linux-audio-user] wav to mp3 converter

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] wav to mp3 converter
From: lee (lee_AT_fallingforward.net)
Date: Thu Jun 03 2004 - 06:53:23 EEST


Matthew Allen wrote:
>
>>-----Original Message-----
>>
>> > find . -name "*.wav" -print -exec oggenc -q 5 {} \;
>>
>>It does exactly the trick I need for making .ogg files out
>>of my wav's. Perfect! for ogg...
>>
>>
>>hack through them. But maybe also somebody could explain to
>>me what the above magic command line is doing so I can
>>subvert it to my own evil purposes. ;-)
>
>
>
> It doesn't look like anyone explained the command line to you so I'll do
> it real quick.
>
> First the entire command is based on find (one of the most underused and
> oft looked over commands I have come across, granted I have only been
> doing this for a year or so)
>
> http://www.die.net/doc/linux/man/man1/find.1.html
>
> so basically:
>
> find
> (name of the command)
>
> .
> (this directory)
>
> -name "*.wav"
> search for the pattern *.wav in the name of the files in this
> dir
>
> -print
> prints the full filename of any matching files
>
> -exec oggenc -q 5 {} \;
> and the most powerful part of find, basically what this does is
> that any files it finds run the following command line [up to the \;]
> replacing {} with the files
>
> So basically the commands runs through all the fiels in the current
> directory and everytime it finds a wave runs
>
> oggenc -q 5 mywave.wav

Yea, find is the bomb. You can use it for pretty much any kind of
repetitive action. Perl has a find too which means you can do it from a
web page through a CGI. And despite the subject line, I would also
recommend using oggenc. Smaller files better quality. Just like Beta
video cassettes </sarcasm>.

-lee


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jun 03 2004 - 06:49:49 EEST