[linux-audio-user] wav to mp3 converter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux