LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-17-2009, 10:11 AM   #1
zeelog
Member
 
Registered: Jan 2008
Posts: 109

Rep: Reputation: 1
create a directory of mp3 using lame


I have a directory full of .wav files that I want to convert
to mp3 using the command lame -h
I can't figure out how to do it. Ok, so I'm not all that bright,
but I know there must be a way. Does anyone know how to do this?
This is in Slackware 12 and, sometimes, in Slackware 10.
 
Old 12-17-2009, 10:30 AM   #2
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Rep: Reputation: 39
i suppose you could do something like
Code:
#lame /directory/to/music/*.wav /directory/to/mp3s/*.mp3
but thats off the top of my head, you may want them in the same folder in which case dw about the second argument
 
Old 12-17-2009, 10:46 AM   #3
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
I'm not sure that will work for lame. I don't believe you can have multiple infiles/outfiles like that. (but I could be wrong)

A for loop will probably do it
Code:
for wavfile in *.wav
do
  lame "$wavfile" "${wavfile/.wav}.mp3"
done

Last edited by GazL; 12-17-2009 at 10:48 AM.
 
Old 12-17-2009, 11:04 AM   #4
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Rep: Reputation: 39
open your favorite text editor such as gedit or kate and copy the following into it
Code:
#!/bin/bash
for wavfile in ./*.wav
do
  lame "$wavfile" "${wavfile/.wav}.mp3"
done
save the file as whatever you like in the directory where your music is saved

you then need to make the file executable by running
Code:
chmod +x filename
you may then double click the file and it will run
 
  


Reply

Tags
directory, lame, mp3, wave


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MP3 (lame) = ? newbiesforever Linux - General 4 11-12-2008 06:13 AM
create mp3 with kaudiocreator(lame problem) alaios Linux - Software 1 02-04-2006 02:58 PM
still need lame, etc to burn mp3 to cd? joel b Suse/Novell 1 05-04-2005 11:48 PM
cannot create directory `/mnt/win_d/MP3': Read-only file system PapaJac Mandriva 11 03-04-2004 05:25 AM
cannot create directory `/mnt/win_d/MP3': Read-only file system PapaJac Mandriva 0 03-02-2004 04:09 PM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration