Blog PostDownload RealMedia Files and Convert them to MP3 in Linux

This morning I woke up and one of Fayrooz songs was playing in my head! I thought of Downloading all of them. So, I found a good website (http://www.6rb.com/music/Singers-13/525.html) with many Fayrooz songs ( I can't say all because I don't know them all). Anyway, that's how I downloaded the Songs and converted them to MP3

You will require those packages:

wget, grep, mplayer, and lame

Procedure:

First, I wanted a list of the files to be extracted from the website, so I save the page as a text file:

wget -O output.txt “http://www.6rb.com/music/Singers-13/525.html

Secondly, extract the links: (Assuming you know what is grep and cut)

grep .rm output.txt|grep http|cut -d\" -f4 > links.txt

Now, we require to download the songs:

wget -i links.txt

Grab a cup of coffee and wait till download is done!

Since I wanted the files to be MP3's instead of real media to burn them on a CD for my car, so we have to convert them to MP3's.

The idea is to convert them to waves using Mplayer and then encode them using lame.

To Convert one file to wave:

mplayer filename.rm -ao pcm:file=filename.wav -vc dummy -vo null

Then encode,

lame -m m filename.wav filename.mp3

I created a script to convert all the files in one directory so simplify the process for me.

Comments

Discuss with me and others You need to sign in to post comments