WMA

SoldStatic
Posts: 3
Joined: 2006-07-09

I have a data CD with wma’s on it. How can I get these into ardour? I’d like them as copies but when I try to import the tracks it doesn’t work…


sampo
Posts: 315
Joined: 2006-03-16
WMA = Windows Media Audio

WMA is a proprietary audio format by Microsoft. Ardour doesn’t support WMA files in any way (and probably never will). You can read more about WMA from wikipedia:
http://en.wikipedia.org/wiki/Windows_Media_Audio

You can use mplayer (http://www.mplayerhq.hu) to decode the files into .wav files:

mplayer -ao pcm:file=[outputfilename].wav [inputfilename].wma

You can use the same command for any type of input file mplayer supports.

PS. You will probably need the codecs on the download page.


SoldStatic
Posts: 3
Joined: 2006-07-09
thanks, mp3??

Thank you for the reply. what about mp3? will ardour ever support that?

Currently I’m using a small bit of code to create both an mp3 and a wav dump of my wma file. it follows:

#!/bin/bash

#set wmafile to first parameter
wmafile=$1

#the output raw wav file
wavfile=$(echo $wmafile | sed -e s/wma/wav/)

#the final mp3 file
mp3file=$(echo $wmafile | sed -e s/wma/mp3/)

#use mplayer to play raw data from wma file outputing to wavfile
mplayer -ao pcm:file=”$wavfile” “$wmafile”

#use lame to encode wav file to mp3
lame “$wavfile” “$mp3file”

—————–

you can put this code in any text file and change its permissions to include executable. then you can call it with # nameOfNewTextFile nameOfSong


sampo
Posts: 315
Joined: 2006-03-16
MP3

MP3 is a non-fee proprietary format. The IP rights of the technology is owned by Fraunhofer. Thus, supporting MP3’s is very problematic.

On the other hand, Apple has bought rights to the MP3 technology from Fraunhofer. Because of this Ardour 2.0 on OSX will be able to use MP3’s because we can use CoreAudio to load sound files off the disk.

Btw. Your script has a bug: If you would use the script to process a file called “wowman.wma”, your wavfile and mp3file would end up being wowavn.wma and womp3n.wma . You should use either “basename” or use $ (end-of-line) in the sed expression: s/wma$/wav/ . The reason why the wowman.wma would become wowavn.wma is that without the “g” flag, sed will replace only the first match.