Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Convert WMA to WAV files for iTunes import Apps
I found a way to convert WMA files to WAV files, which can be imported directly into iTunes. The first step is to get mplayer, a unix media player that can play WMA files. This will install mplayer in /usr/local/bin.

This program has the ability to dump to a WAV file with the command mplayer foo.wma -ao pcm. This will put a file called audiodump.wav in the current directory. Of course, this won't work with multiple inputs, so I whipped up a quick shell script which renames audiodump.wav to foo.wma.wav, then moves the original file to the trash, and then processes the next argument:
#!/bin/tcsh

while($#argv != 0)
mplayer "$argv[1]" -ao pcm
mv audiodump.wav "${argv[1]}.wav"
mv "${argv[1]}" ~/.Trash/
shift
end
[Editor's note: I haven't tried this myself...]
    •    
  • Currently 2.67 / 5
  You rated: 4 / 5 (6 votes cast)
 
[89,825 views]  

Convert WMA to WAV files for iTunes import | 22 comments | Create New Account
Click here to return to the 'Convert WMA to WAV files for iTunes import' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
will it...?
Authored by: VEGx on Feb 12, '03 01:36:27PM

The only thing I am uncertain is: will it wait until `mplayer' has finished converting?
I'm not so familiar with `tcsh' scripts.



[ Reply to This | # ]
will it...?
Authored by: Xeo on Feb 13, '03 08:43:56AM

Yes it will. Shell scripts wait for each command to exit before moving on to the next unless you specify otherwise.



[ Reply to This | # ]
Thanx
Authored by: VEGx on Feb 13, '03 06:44:18PM

It's good to know. Saved me from experimenting! :)



[ Reply to This | # ]
-> mp3
Authored by: englabenny on Feb 12, '03 03:59:36PM

is there a way to "pipe" this on to itunes or something making an mp3-file out of it? It would be a great thing if you could have a shellscript that you gave a batch of wma:s and it gave you mp3:s in the end....



[ Reply to This | # ]
-> mp3
Authored by: englabenny on Feb 12, '03 05:03:20PM
Check me; i found it out myself. I got lame with fink and just modified the script a little:
#!/bin/tcsh

while($#argv != 0)
mplayer "$argv[1]" -ao pcm
  lame audiodump.wav "${argv[1]}.mp3"
  mv audiodump.wav ~/.Trash/
  mv "${argv[1]}" ~/.Trash/
  shift
end
works fine, only i would want it put the temporary file audiodump.waw in /tmp or something instead of the folder of the script.

[ Reply to This | # ]
WMA to MOV
Authored by: borsad on Feb 13, '03 11:38:03AM

Would it be possible to do the same with a WMA movie file, that is: to convert it to some sort of Quicktime compatible format?



[ Reply to This | # ]
Hyperion does this too
Authored by: xtester on Feb 13, '03 03:43:23PM
hyperion is a gui front end for the ffmpeg utility that I believe is the same one mplayer uses (correct me if I'm wrong). Anyway, it converts .wma to .wav files and a few other things as well. The .wma to .wav seems to work ok, but there's a problem with the .wma to .mp3. I found it easier to use than mplayer. You can get it here: www.apple-x.net/thetakent/downloads.html There is a known bug where it won't take any files with spaces. It does do batch files, and it is published under GPL:)

[ Reply to This | # ]
Hyperion does this too
Authored by: RaschVR6 on Jun 07, '03 04:24:34AM

Alright I am just a plain MORON. I tried to convert the file to a WAV. I took out the spaces in the file name but I still could not convert. Anywayss can someone help me please?



[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: nachobel on Oct 01, '03 09:09:07PM

Hey, I instelled this but then I went to the terminal and tired to run the command "mplayer" but it said "command not found." I went to /usr/local/bin and a file named mplayer was there, but it still is telling me that the command is not found. I don't know what I did wrong. help?



[ Reply to This | # ]
Teach your shell new tricks
Authored by: kfaulhaber on Oct 01, '03 10:47:40PM

type 'rehash' or open a new terminal window.



[ Reply to This | # ]
Teach your shell new tricks
Authored by: nachobel on Oct 01, '03 11:56:10PM

yeah guy.

So I'm not that ignorant.

Here's some text:

Last login: Wed Oct 1 23:54:05 on ttyp1
Welcome to Darwin!
[nacho:~] nachobel% cd /usr/local/bin/
[nacho:/usr/local/bin] nachobel% ls
links mplayer pcpmac pgetfinfo pmvmac psetfinfo psync sdl-config
[nacho:/usr/local/bin] nachobel% mplayer
mplayer: Command not found.
[nacho:/usr/local/bin] nachobel% rehash
[nacho:/usr/local/bin] nachobel% mplayer
mplayer: Command not found.



[ Reply to This | # ]
Teach your shell new tricks
Authored by: kfaulhaber on Oct 02, '03 10:23:11PM

is it executable (does /usr/local/bin/mplayer work?) and is /usr/local/bin in your path?



[ Reply to This | # ]
Teach your shell new tricks
Authored by: nachobel on Oct 06, '03 04:49:31PM

hey guy

thanks, that helped. I typed /usr/local/bin/mplayer and it worked, and then i just typed mplayer, and that worked too. I don't know why, but hey, that's cool.

Okay, so I have links installed, and /usr/local/bin/links works, but just typing links doesn't. How do I "get it in my path" or whatever?



[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: velkr0 on Dec 18, '03 12:34:09AM

on a side note... this didn't work for me when i was trying to convert 'protected' wma's... so.. i used my brain for a bit... and came up with a multi-step solution...

i turned on my windows machine... went in M$ media player (8), queued up my protected wma's and the selected 'copy to cd or device'... WMP then converted the wma's and burned them to a plain old audio cd... i then ejected the cd... put it in my powerbook and then ripped them as mp3's in iTunes...

done and done... wma's never again!!!



[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: cybermill on Jan 13, '04 01:04:10AM
I tried this and my mplayer reported:
Detected audio codec: [divx] drv:4 (DivX audio (WMA)) Requested audio codec family [divx] (vfm=4) not available (enable it at compile time!) Couldn't initialize audio codec! -> nosound Audio: no sound!!! Video: no video!!! Start playing... MPlayer interrupted by signal 10 in module: unknown
I assume mplayer crashed because it couldn't find the audio codec. Curious as to why this is as WMP seems to handle the file just fine, does this have to do with the divx encoding?

[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: robg on Jan 21, '04 08:40:28AM
I received a hint submission that really belongs here as a comment, so here it is. The original submitter was (a) anonymous, and (b) not a native English speaker, so I've tried to clarify it a bit; any mistakes in editing are mine, not those of the original submitter.
I donĀ“t have the MPlayer for Darwin, but I use Mplayer for OS X. If you go to its menu and open the open the Preferences, you see in Miscellaneous Settings an Additional Parameters field. In this field, I put the parameter -ao pcm, and I opened the WMA file. In few seconds, the audilump.wav appeared in my Hard Disk.

I imported this file in iTunes and coverted it into MP3 (you can convert to AAC, too).
Again, my apologies if I tweaked anything while re-writing...

-rob.

[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: lotas on Jan 21, '04 09:51:44AM

works well with linux too!! my mac has not got the power (captin) to do such a task, so i got my dual athlon 2Gz to help. i modified the script ot use gogo (no coda, i think, check google for it) and after 5 min it had a full albus which was encoded with wma in mp3 format. so both the mac and linux box work with it fine.
Great tip BTW!

---
Lotas Smartman
www.lotas-smartman.net
www.the-hairy-one.com
www.lsn-blog.tk



[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: fozzi on Feb 29, '04 10:03:33PM
I pieced together a script that works beautifully for me at least on panther. You'll need mplayer and lame in your PATH.

#!/bin/bash
for i in *.wma do mplayer -ao pcm -aofile "${i%.wma}.wav" "$i" && lame --preset hifi "${i%.wma}.wav" "${i%.wma}.mp3"
rm "${i%.wma}.wav"
done
you can put the script in a directory in your PATH as well, but its easier IMO to just make an alias to it by typing
alias wmatomp3="/pathtoyourscript/probablyinyouruserdirectory" 
Note: You can change the options on lame to whatever you want, I just chose a middle of road bitrate preset.

[ Reply to This | # ]
Convert WMA to WAV files for iTunes import
Authored by: posterlu on Mar 08, '07 12:14:38AM
I had some issues with changed options to mplayer and lame. Here is an updated version: #!/bin/bash
for i in *.wma
do
mplayer -ao pcm:file="${i%.wma}.wav" "$i" && lame --preset standard "${i%.wma}.wav" "${i%.wma}.mp3"
rm "${i%.wma}.wav"
done
It still has one issue though, files with a comma are renamed wrong, ie. everything after the comma is missing. I have not troubleshooted this further yet.

[ Reply to This | # ]
VLC does this too
Authored by: gidds on Apr 05, '04 09:36:15AM
I couldn't get MPlayer to work properly, but VLC can do it as well.

You need to run the VLC executable from the command line, as follows:

path_to_VLC/VLC.app/Contents/MacOS/VLC file_to_convert.WMA --aout file

This will create a file called audiofile.wav in the current directory. I think you need to quit VLC manually after it's done.

---

Andy/

[ Reply to This | # ]

EasyWMA
Authored by: sjk on Apr 06, '04 12:15:38AM
.wav to iTunes
Authored by: dougallen48 on Jul 13, '07 02:17:35PM

I'm trying to avoid asking my Son for help, so please bear with me. I found a .wav file on the Net that I would like on my iPod. How do I capture the .wav file then transfer it to iTunes?

Thanks!



[ Reply to This | # ]