![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Location: PA
Beans: 33
Ubuntu 6.06
|
I have spent weeks trying to figure out how to convert my .rm and .ram files to mp3. I finally found it by searching for something to encode an mp3 from a wma. This works for wma, RealMedia or any other format that your mplayer is set up to play.
Also so everyone knows I did not come up with this on my own, I found it here and had to make some changes to make it compatible with enhancements in mplayer. 1. open gedit to a blank document (Applications >Accessories>Text Editor) 2. copy this text into it, then save it as wmamp3 (or whatever format you use it for) #!/bin/bash current_directory=$( pwd ) #remove spaces for i in *.ram; do mv "$i" `echo $i | tr ' ' '_'`; done #remove uppercase for i in *.ram; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done #Rip with Mplayer / encode with LAME for i in *.ram ; 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 *.ram; do mv "$i" "`basename "$i" .ram`.mp3"; done rm audiodump.wav 3. For wma use this, or for other formats anywhere you see .wma change it to .rm or .ogg or.mov, use it for anything mplayer can play 4. Open a terminal (Applications>Accessories>Terminal) and make sure you are in the directory the file was saved in 5. make it executable with: chmod +x wmamp3 (or for other to use it too use a+x for +x) 6. and copy it to your script folder with: sudo cp wmamp3 /usr/bin/ (you'll want to rename other iterations things like rmmp3, movmp3 and change the line accordingly) 7. Then use it by going to the folder in terminal and typing wmamp3 WARNING!! This will change ALL your files in that folder of the type specified to an mp3 and remove the old files. Create backups of your files first and test it on your system to make sure you have everything configured properly!! Notes: I'm not sure I like the quality of the files made by lame, i may change later to toolame or if anyone knows of a better mp3 encoder I'm all ears for better options. Also, you can use this to convert to ogg, wma or anything you have an encoder for. I hope this helps anyone looking for a quick solution to convert large amounts of files. On my system it took about 15 seconds to convert each rm file to mp3. Good luck! |
|
|
|
|
|
#2 |
|
A Carafe of Ubuntu
![]() Join Date: Feb 2006
Beans: 112
Ubuntu 6.06
|
Re: HOW TO: Convert any audio to an mp3
The perl audio converter pac will do the job as well, although it is rather a grief to install
--evaristegalois |
|
|
|
|
|
#3 |
|
A Carafe of Ubuntu
![]() Join Date: Feb 2006
Beans: 112
Ubuntu 6.06
|
Re: HOW TO: Convert any audio to an mp3
FANTASTIC! I spent hours trying to re-install the perl audio converter pac which once upon a time I had working but couldn't get re-installed, and now you have given such an elegant solution for the problem. Thanks!
--evaristegalois |
|
|
|
|
|
#4 |
|
5 Cups of Ubuntu
![]() Join Date: Jun 2006
Beans: 21
|
Re: HOW TO: Convert any audio to an mp3
great how-to. using it right now and it's working fantastically.
however, i think there might be a typo under point 3. the script you've written is NOT for wma files, it's for .ram (real audio? i have no idea) files. easy enough for most to figure out, but still. |
|
|
|
|
|
#5 |
|
Extra Foam Sugar Free Ubuntu
![]() |
Thanks a lot for this very useful script, I really appreciate your how-to
|
|
|
|
|
|
#6 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2005
Beans: 8
Ubuntu 6.06
|
Re: HOW TO: Convert any audio to an mp3
it's just GREAT!
Adam |
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2006
Location: New Zealand
Beans: 6
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOW TO: Convert any audio to an mp3
Brilliant - just used it to convert a bunch of FLACs created by Sound Juicer from an audio CD
|
|
|
|
|
|
#8 |
|
5 Cups of Ubuntu
![]() Join Date: Jul 2005
Beans: 17
|
Re: HOW TO: Convert any audio to an mp3
I must be missing something. Evertime I execute the script I get the following:
-aofile is deprecated. Use -ao pcm:file=<filename> instead. MPlayer 2:0.99+1.0pre8-0ubuntu8 (C) 2000-2006 MPlayer Team CPU: Genuine Intel(R) CPU T2500 @ 2.00GHz (Family: 6, Model: 14, Stepping: CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. |
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Jun 2007
Beans: 82
Xubuntu 8.04 Hardy Heron
|
Re: HOW TO: Convert any audio to an mp3
I got something similar but then I fixed the parts that say ".ram" into ".rm" in the script. If you are converting wma files then your .ram should say .wma.
__________________
I installed ubuntu 18.4.2007. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|