LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices

By cadj at 2004-12-28 02:05
Heres how to convert these files easily.

REQUIREMENTS:
mplayer
lame

1. create a text file called wmamp3 in your ~/

2. Open the file in your favorite editor and enter the following

Code:
#!/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 audiodump.wav -o $i; done

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

rm audiodump.wav
3. Save the file

4. In a console, give the command
Code:
chmod +x ~/wmamp3
5. as root, copy the file to your exec path (/usr/bin or /bin)

6. Now you can change to the directory containing your WMA files and give the command
Code:
wmamp3

It usually takes approx 30 seconds to convert a 4 min long file.

well i hope this has helped, if there are any improvements or comments please just let me know.

by masand on Mon, 2005-01-03 16:17
do u have any idea for converting real media audio to mp3 format??

by cadj on Mon, 2005-01-10 20:26
yes, i cant think of any reason this method wont work with real media audio,

in the script, just change references to *.wma to *.rm or whatever the extension is

by masand on Mon, 2005-01-10 21:16
thanks for u reply
but i tried that too
the problem with me i think is of appropriate plugins

i got the "all "and "esential" packages of plugins form mplayer's site
what else do i need in plugins??

regards

by cadj on Tue, 2005-01-11 02:04
might havto try

http://www1.mplayerhq.hu/homepage/design7/codecs.html

and install the realmedia codecs, i havent used these as i apt-get the win32codecs package in debian

by sk545 on Tue, 2005-01-11 19:23
Very nice. I have to give this a try sometime...

It *should* work with realmedia, i mean the process is basically the same, i think. I looked here for more info:

http://linuxathome.com/index.php?p=91

by cadj on Wed, 2005-01-12 07:37
this process can be used for any tipe of media that your mplayer can play, including extracting the audio from video files (mov, wmv mpg etc)

im planning to make a GUI frontend to this using something like xdialog, ill need to learn a bit but it should come one day

by sk545 on Sun, 2005-01-16 09:20
cool.

by aaa on Mon, 2005-01-24 08:28
I have converted from real audio, just make sure you have the codecs installed for maplayer.

by masand on Mon, 2005-01-24 09:07
Quote:
Originally posted by aaa
I have converted from real audio, just make sure you have the codecs installed for maplayer.
what plugins do u require for converting from real audio to mp3 etc ???

please post the command also

regards

by aaa on Tue, 2005-01-25 13:36
http://www1.mplayerhq.hu/MPlayer/rel...050115.tar.bz2
These are the real player 9 codecs. Look here for other codecs. Extract the codecs and put them in /usr/local/lib/codecs. MPlayer can convert to WAV, the script uses lame to convert the wav to mp3.


  



All times are GMT -5. The time now is 02:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration