You are not logged in.

#1 2009-11-25 20:44:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

lame encode an entire directory from the shell

I have a pile of wav files in a single directory that I need to encode with lame.  I'm at a loss how to do it in a single operation.  The below fails:

$ lame -V 2 *.wav
lame: excess arg 03_track no title.wav

Can someone recommend a GUI frontend for lame that'll run under GTK?

Last edited by graysky (2009-11-25 20:49:00)

Offline

#2 2009-11-25 20:51:11

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: lame encode an entire directory from the shell

Do it in a "for" loop, e.g.

for WAV in *.wav; do
  lame -V 2 "$WAV"
done

Last edited by Xyne (2009-11-25 21:43:45)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-11-25 21:00:38

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: lame encode an entire directory from the shell

Same but with .wav replaced by .mp3 in each filename:

$ for file in *.wav; do lame -V 2 "$file" "${file%.*}".mp3; done

Last edited by azleifel (2009-11-25 21:05:25)

Offline

#4 2010-02-22 22:00:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: lame encode an entire directory from the shell

Thanks guys.  How would I go about adding azleifel's one-liner to a right-click option in Gnome?  That would be pretty slick.

Offline

#5 2010-02-23 20:19:31

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: lame encode an entire directory from the shell

Try this package: http://www.archlinux.org/packages/?q=nautilus-actions
I don't know how you use it though


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

Board footer

Powered by FluxBB