LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2002, 01:50 PM   #16
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64

Well the files appear in the same directory unless you specify something else.

Lets say your mp3's exist in /home/mp3

Then to convert you can simply:
cd /home/mp3
mpg123 -w filename.wav filename.mp3

Then the filename.wav file will exist in that same directory as the mp3. Now I believe you can get fancy, so let's say you have a wav directory you want to have them all go to, then:
mpg123 -w /home/wav/filename.wav /home/mp3/filename.mp3
I think does work.

Cool
 
Old 12-13-2002, 03:50 PM   #17
brufleth
LQ Newbie
 
Registered: Sep 2002
Posts: 15

Rep: Reputation: 0
Alright so if I specify a specific filename.wav followed by a specific filename.mp3 it will convert it and create the new wave file. Is there a way to automate this? Using * causes it to just create one file which just screws everything up. I'm inexperienced at writing scripts even though I guess it really shouldn't be too hard.

Thanks.
 
Old 12-13-2002, 03:55 PM   #18
brufleth
LQ Newbie
 
Registered: Sep 2002
Posts: 15

Rep: Reputation: 0
When using cdcopy it says no such file or directory exists. It would seem it can't deal with files that have a space in the name as the path it claims doesn't exist contains the first word of a mp3 file name.
 
Old 12-13-2002, 03:57 PM   #19
brufleth
LQ Newbie
 
Registered: Sep 2002
Posts: 15

Rep: Reputation: 0
Yeah I just tested it. How would I go about editing the cdcopy script to make it convert files with spaces in the names?
 
Old 12-13-2002, 04:14 PM   #20
brufleth
LQ Newbie
 
Registered: Sep 2002
Posts: 15

Rep: Reputation: 0
or if that's too much does anyone know a good script to remove spaces from all the names of files in a directory? That'd work fine too.
 
Old 12-16-2002, 01:09 AM   #21
magnafix
LQ Newbie
 
Registered: Dec 2002
Distribution: RH8
Posts: 6

Rep: Reputation: 0
xcdroast isn't doing it for me, and I'm comfortable with command-line scripts generally, but the aforementioned 'cdcopy' passes a -w to mpg123 which is invalid, causing it to bomb out while trying to make wav files out of my mp3s.

man mpg123 | grep -i wav

finds zilch.

Suggestions for next step welcome.
 
Old 12-16-2002, 01:20 AM   #22
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Did either of you submit this to the author? He is on here sometimes, but you are best off emailing him your findings. He is very open to suggestion/bug reporting, so don't be worried about that. And he does fix things VERY quickly too. It's Jetblackz if you didn't know

Cool
 
Old 12-16-2002, 10:02 AM   #23
magnafix
LQ Newbie
 
Registered: Dec 2002
Distribution: RH8
Posts: 6

Rep: Reputation: 0
I found a workaround for the lack of the -w switch (but I'll report it to author as well):

mpg123 -s $mp3file | sox -t raw -r 44100 -s -w -c 2 - $wavfile

Next I'll figure out a solution to the filenames-with-spaces problem. Some well placed quotes and backslashes should do the trick.
 
Old 12-17-2002, 02:20 AM   #24
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
BTW, if I read your above comment correctly:
Quote:
but the aforementioned 'cdcopy' passes a - w to mpg123 which is invalid
then you are saying that:
mpg123 -w filename.wav filename.mp3
WON'T convert the file into a wav, but it does. I am wondering if you are missing something??? Or if I am misreading your reply?

Cool
 
Old 12-17-2002, 09:03 AM   #25
magnafix
LQ Newbie
 
Registered: Dec 2002
Distribution: RH8
Posts: 6

Rep: Reputation: 0
Yes that's is what I am saying:

# mpg123 -w filename.wav silent_morning.mp3
mpg123: Unknown option "w".

# rpm -q mpg123
mpg123-0.59o-1

# uname -a
Linux samson.modwest.com 2.4.18-18.8.0 #1 Thu Nov 14 00:10:29 EST 2002 i686 i686 i386 GNU/Linux
 
Old 12-20-2002, 12:21 AM   #26
brufleth
LQ Newbie
 
Registered: Sep 2002
Posts: 15

Rep: Reputation: 0
You just need to download and install mpg123. That's what I was getting until I installed it myself. I guess it came with older distros but now they aren't including it due to various rights to MP3 encoding. Just do a search. Installing it wasn't too hard. I just don't want to have to convert each file individually.
 
Old 12-20-2002, 12:31 AM   #27
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
That probably will fix it, but I am curious as to why it didn't work in the first place. It appears that mpg123 is installed, but the -w option simply isn't working. That's the wierd part.

What distro is that you are running? Is it on RH8? They really screwed up by not putting those things in their distro this time...

Anyway, yeah, you'll probably need a few libs and things for mp3's I'd guess.

Good suggestion brufleth

Cool
 
Old 12-20-2002, 01:13 AM   #28
magnafix
LQ Newbie
 
Registered: Dec 2002
Distribution: RH8
Posts: 6

Rep: Reputation: 0
Redhat 8, nothing fancy.

I upgraded to mpg123-0.59r from mpg123-0.59o-1.i386.rpm and now the -w option is recognized. Swapped out my alternate line and now it's happy and working great so far.
 
Old 12-20-2002, 01:16 AM   #29
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Cool, glad it's all working now for you.
 
  


Reply


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 burning software April Slackware 20 07-14-2005 07:35 AM
burning mp3 to audio cd evian Linux - General 4 03-31-2003 04:22 AM
Burning MP3 CDs bxb32001 Linux - Software 12 08-25-2002 11:56 PM
MP3 Burning Software? RedHatMN Linux - General 2 04-08-2002 08:00 PM
Burning MP3 Cdroms Raygun Linux - General 0 05-18-2001 09:55 AM


All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration