LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-24-2005, 01:13 PM   #1
chemdawg
Member
 
Registered: Jan 2005
Distribution: Mandriva
Posts: 206

Rep: Reputation: 31
wma to mp3 how-to isn't working


I have just tried this to change my wma to an mp3:

http://www.linuxquestions.org/questi...icle&artid=352

and here's the errors i get: (I do have mplayer and lame installed) (don't laugh - my wife likes carrie underwood)

[root@localhost user]# wmamp3
mv: `Carrie_Underwood-1-Inside_Your_Heaven.wma' and `Carrie_Underwood-1-Inside_Your_Heaven.wma' are the same file
MPlayer 1.0pre6-3.4.3 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.


77 audio & 188 video codecs
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such file or directory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing carrie_underwood-1-inside_your_heaven.wma.
ASF file format detected.
Clip info:
name: Inside Your Heaven
author: Carrie Underwood
copyright: (p)&(c) 2005 19 Recordings Limited
==========================================================================
Trying to force audio codec driver family libmad...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16002->176400 (128.0 kbit)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (ffmpeg))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
[AO PCM] Info: fastest dumping is achieved with -vc dummy -vo null
PCM: Info: to write WAVE files use -waveheader (default).
AO: [pcm] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Video: no video
Starting playback...
A: -0.0 (00.0) ??,?% 0%

Exiting... (End of file)
LAME version 3.96.1 (http://lame.sourceforge.net/)

usage: lame [options] <infile> [outfile]

<infile> and/or <outfile> can be "-", which means stdin/stdout.

Try:
"lame --help" for general usage information
or:
"lame --preset help" for information on suggested predefined settings
or:
"lame --longhelp"
or "lame -?" for a complete options list

/usr/bin/wmamp3: line 13: audiodump.wav: command not found
[root@localhost user]#


anybody else know whats happening? obviously, they won't play with any player, although the name does thange to an mp3.
 
Old 09-24-2005, 01:35 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this part has to be wrong... "audiodump.wav -o $i" that means that audiodump is the input, and $i is the output, clearly wrong... change it to "-o audiodump.wav $i"
 
Old 09-24-2005, 10:24 PM   #3
chemdawg
Member
 
Registered: Jan 2005
Distribution: Mandriva
Posts: 206

Original Poster
Rep: Reputation: 31
made the necessary changes you suggest - got the following error:

mv: `Carrie_Underwood-1-Inside_Your_Heaven.wma' and `Carrie_Unde
rwood-1-Inside_Your_Heaven.wma' are the same file
MPlayer 1.0pre6-3.4.3 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood (Family: 8, Stepping
: 4)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not opti
mal!
To get best performance, recompile MPlayer with --disable-runtim
e-cpudetection.


77 audio & 188 video codecs
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such file or dire
ctory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing carrie_underwood-1-inside_your_heaven.wma.
ASF file format detected.
Clip info:
name: Inside Your Heaven
author: Carrie Underwood
copyright: (p)&(c) 2005 19 Recordings Limited
================================================================
==========
Trying to force audio codec driver family libmad...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16002->176400 (128.
0 kbit)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (ffmpe
g))
================================================================
==========
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch
/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed i
nt
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (
Little-Endian)
[AO PCM] Info: fastest dumping is achieved with -vc dummy -vo nu
ll
PCM: Info: to write WAVE files use -waveheader (default).
AO: [pcm] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch
/16bit...
Video: no video
Starting playback...
A: -0.0 (00.0) ??,?% 0%

Exiting... (End of file)
LAME version 3.96.1 (http://lame.sourceforge.net/)

usage: lame [options] <infile> [outfile]

<infile> and/or <outfile> can be "-", which means stdin/stdo ut.

Try:
"lame --help" for general usage information
or:
"lame --preset help" for information on suggested predef ined settings
or:
"lame --longhelp"
or "lame -?" for a complete options list

/usr/bin/wmamp3: line 13: -o: command not found


again the product of this is named .mp3 but won't play. surely someone has to have this same problem???
 
Old 09-25-2005, 02:02 AM   #4
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
try to replace -ao pcm -waveheader with -ao pcm:waveheader
 
Old 09-25-2005, 03:15 AM   #5
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
I don't know whether mplayer does anything as it sould, but lame obviously doesn't.

Quote:
/usr/bin/wmamp3: line 13: -o: command not found
resp. /usr/bin/wmamp3: line 13: audiodump.wav: command not found
The correct command on line 13 of wmamp3 should be like "lame audiodump.wav something.mp3". But it seems as if there's a semicolon or a new-line somewhere in the middle of that. Can you post the script? Or, if it is too long, about lines 10 to 15 of it?

EDIT: Didn't see the link at the top of your post... so just ignore what I said...

Last edited by DeNayGo; 09-25-2005 at 04:19 AM.
 
Old 09-25-2005, 03:37 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why did we accept this howto in the first place?! that's a pretty crappy script i've gotta say... well post what you've currently got and we'll go from there...
 
Old 09-25-2005, 04:26 AM   #7
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
@chemdawg
As there's nothing on line 13 of the script, I suppose the editor you used to save it inserted a new-line character before audiodump.wav, cause the line was too long, so it will probably work if you merge the two lines..

Anyway I wouldn't use mplayer for that, I think transcode is way better for converting.
 
Old 09-25-2005, 09:20 AM   #8
chemdawg
Member
 
Registered: Jan 2005
Distribution: Mandriva
Posts: 206

Original Poster
Rep: Reputation: 31
Thanks for all the help so far. DeNayGo was right - nano wrapped the text when it shouldn't have. Fixed that and made changes suggested by acid an heema. Here's the script I have now:



#!/bin/bash

current_directory=$( pwd )

#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done

#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done

#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader $i && lame -m s -o audiodump.wav $i; done

#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done

rm audiodump.wav


It still doesn't work though:

# wmamp3
mv: `Carrie_Underwood-1-Inside_Your_Heaven.wma' and `Carrie_Underwood-1-Inside_Your_Heaven.wma' are the same file
MPlayer 1.0pre6-3.4.3 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.


77 audio & 188 video codecs
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such file or directory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing carrie_underwood-1-inside_your_heaven.wma.
ASF file format detected.
Clip info:
name: Inside Your Heaven
author: Carrie Underwood
copyright: (p)&(c) 2005 19 Recordings Limited
==========================================================================
Trying to force audio codec driver family libmad...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16002->176400 (128.0 kbit)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (ffmpeg))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
[AO PCM] Info: fastest dumping is achieved with -vc dummy -vo null
PCM: Info: to write WAVE files use -waveheader (default).
AO: [pcm] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Video: no video
Starting playback...
A: -0.0 (00.0) ??,?% 0%

Exiting... (End of file)
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding audiodump.wav to carrie_underwood-1-inside_your_heaven.wma
Encoding as 44.1 kHz 128 kbps stereo MPEG-1 Layer III (11x) qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
0/2 ( 0%)| 0:00/ 0:00| 0:00/ 0:00| 0.0000x| 0:00
average: 128.0 kbps LR: 2 (100.0%)

Writing LAME Tag...done
ReplayGain: +51.0dB
#

well I think we're making progress. Sorry, I don't know anything about scripts or any of the like. I'm at your mercy on this one.

BTW - is there another way of converting wma to mp3?
 
Old 09-25-2005, 10:01 AM   #9
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
Yeah, there is another way. Using transcode.

Something like that should work:
transcode -i file.wma -x null,mplayer -y null,lame -o file.mp3

And, in case ffwmav2 is included in transcode's ffmpeg codec:
transcode -i file.wma -x null,ffmpeg -y null,lame -o file.mp3

You can specify the bitrate etc. with the -b parameter..

Quote:
Part of man transcode
-b b[,v,[q,[m]]]
audio encoder bitrate kBits/s[,vbr[,quality[,mode]]] [128,0,5,0]

The mode parameter specifies which modus lame should use for
encoding. Available modes are:
0 Joint Stereo (default)
1 Full stereo
2 Mono
 
Old 09-25-2005, 12:50 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmm.. humble pie time... read that script wrong and thought that bit about -o was for mplayer, not lame... yeah that does make sense after all :-s

Essentially you might just want to ignore the formatting of the script and such and just use this on a per file basis:

Code:
for i in *.wma
do
  mplayer -vo null -vc dummy -af resample=44100 -ao pcm -waveheader $i
  lame -m s audiodump.wav -o $(basename $i wma).mp3
done
that basename part will also make blah.wma convert to blah.mp3, as it seems unless lame adds it's own suffix it'll be overwriting the original file...
 
Old 09-25-2005, 02:06 PM   #11
chemdawg
Member
 
Registered: Jan 2005
Distribution: Mandriva
Posts: 206

Original Poster
Rep: Reputation: 31
acid: not sure how to use what you gave me. is that a scrip that i can make executable like the one I've been trying to use?

DeNayGo: Can't get transcode to work either. I finally got it installed though. will get back on this later

I found this script in the wiki that i also tried:

http://wiki.linuxquestions.org/wiki/.wma_to_.mp3

and that one didn't work either. Now, I'm thinking there could be something wrong with the way mplayer or lame is installed. Is that even remotely possible?
 
  


Reply



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
Wma to Mp3 Knowledgements Slackware 23 09-23-2006 09:07 AM
wma to mp3 pulsez Linux - Newbie 5 10-27-2005 07:17 PM
MP3 to WMA spotslayer Linux - Software 5 10-08-2004 04:45 PM
how to change wma into mp3? roserational Linux - Newbie 1 02-15-2004 11:03 PM
Is WMA better than MP3 Imek General 6 12-04-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 PM.

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
Open Source Consulting | Domain Registration