HowToRipRealaudioStreamsToMp3

Differences between revisions 1 and 2
Revision 1 as of 2006-05-30 12:58:30
Size: 4672
Editor: parent-proxy-msd6-nat
Comment:
Revision 2 as of 2006-05-30 13:57:16
Size: 4796
Editor: parent-proxy-msd6-nat
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
How To: Capturing streamed audio as .mp3 == Capturing streamed audio as .mp3 ==
Line 5: Line 5:
Why? === Why? ===
Line 9: Line 9:
This guide tells you how to capture Real Audio .ra and .rm streams (the most common kind). '''This guide tells you how to capture Real Audio .ra and .rm streams''' (the most common kind).
Line 12: Line 12:
Line 14: Line 15:
NOTE: In most countries it is legal to capture streamed audio, provided that this is for personal use and not for further duplication or commercial re-use. However - note the comments here. Use at your own risk. '''''NOTE:''' In most countries it is legal to capture streamed audio, provided that this is for personal use and not for further duplication or commercial re-use. However - note the comments here. Use at your own risk.''
Line 16: Line 17:
Steps === Steps ===
Line 23: Line 25:
How to install Real Player ==== How to install Real Player ====
Line 27: Line 29:
Install the other software you’ll need ==== Install the other software you’ll need ====
Line 37: Line 39:
Code: {{{
Line 40: Line 42:
Sudo apt-get install lame Sudo apt-get install lame}}}
Line 43: Line 46:
Finding your Audio Stream. ==== Finding your Audio Stream. ====
Line 50: Line 53:
In either case you’re looking for a URL which ends with a something.ra or something.rm filename. In either case you’re looking for a URL which ends with a '''something.ra''' or '''something.rm''' filename.
Line 54: Line 57:
Capture your Audio Stream ==== Capture your Audio Stream ====
Line 58: Line 61:
NOTE: before you start, you are going to me making some massive .wav files – approx 10MB per minute of recording. Make sure you have enough disk space for the time you want to record. You’ll need about (2.1 x 10 x recording length in minutes)MB. '''''NOTE:''' before you start, you are going to me making some massive .wav files – approx 10MB per minute of recording. Make sure you have enough disk space for the time you want to record. You’ll need about (2.1 x 10 x recording length in minutes)MB.''
Line 62: Line 65:
Code:
vsound –d –t –f myfilename.wav realplay url_of_the_stream_you_want_to_ripRealplayer will open up and play the stream (the –d parameter means you can listen while ripping). At the same time, it will generate a large Sun ULAW format file containing the stream. When it’s got what you want, close down Real Player. Sox will start up, create a .wav file from the ULAW, then delete the ULAW. This may take some time – but you can monitor it in a file browser.
{{{
vsound –d –t –f myfilename.wav realplay url_of_the_stream_you_want_to_rip}}}
Line 65: Line 68:
Converting to .mp3 Realplayer will open up and play the stream (the –d parameter means you can listen while ripping). At the same time, it will generate a large Sun ULAW format file containing the stream. When it’s got what you want, close down Real Player. Sox will start up, create a .wav file from the ULAW, then delete the ULAW. This may take some time – but you can monitor it in a file browser.

==== Converting to .mp3 ====
Line 69: Line 74:
Code:
lame myfilename.wav myfilename.mp3A dialogue will open in your terminal showing the process. Again, this may take time, depending on your processor speed and the file size. You can use Audacity to edit the .mp3 further – eg to make breaks between songs.
{{{
lame myfilename.wav myfilename.mp3}}}

A dialogue will open in your terminal showing the process. Again, this may take time, depending on your processor speed and the file size. You can use Audacity to edit the .mp3 further – eg to make breaks between songs.
Line 74: Line 81:
NOTES '''NOTES'''

I'll Cut and Paste first and come back to do the formatting later.

Capturing streamed audio as .mp3

Why?

Internet radio stations are a rich resource. More and more of them are archiving their audio material. Sometimes this can be simply downloaded, simply as a Podcast (usually .mp3, sometimes .ogg). More often the audio is ‘streamed’ – i.e. the file plays directly but can’t be saved.

This guide tells you how to capture Real Audio .ra and .rm streams (the most common kind).

Some stations also stream .mp3 and .ogg. There is a separate guide for those, susing StreamTuner and StreamRipper, here.

You can also record the audio from the sound output using something like Audacity – but the quality is limited by your sound card. With this method you’ll be grabbing the digital audio stream file directly. This process is called ‘Ripping’, as opposed to ‘Recording’

NOTE: In most countries it is legal to capture streamed audio, provided that this is for personal use and not for further duplication or commercial re-use. However - note the comments here. Use at your own risk.

Steps

Install Real Player. - this is the easiest way to listen to the audio steams Install the other software you’ll need – Vsound and Sox to grab the audio stream. Lame to convert it to an .mp3. Find an audio stream – it can be slightly tricky to find the URL Capture your stream - you'll end up with a large .wav file. Convert your stream to a .mp3 file - to shrink it down to size and make it work on your portable player.

How to install Real Player

Real Player is a proprietary package. For information on how to install it, read here. You will also need to configure it to play Real Audio formats. Read the Real Player section here.

Install the other software you’ll need

Read here for general instructions on how to install software.

The packages you need are vsound, lame and sox. Vsound grabs audio streams Sox converts them to a very large .wav file Lame is a handy package for converting most audio file types to most others. You may already have these installed. Otherwise, with Universe and Multiverse repositories enabled, type the following in a terminal window:

sudo apt-get install vsoundCode:
sudo apt-get install soxCode:
Sudo apt-get install lame

And you’re ready to start looking for audio streams.

Finding your Audio Stream.

Vsound needs to know the URL of the audio stream it is grabbing. This may not be obvious at first glance. For example, some sites, like NPR (eg here), nest the URL inside a .smil (Standard Multimedia Integration Language) file. If you click on the links you will be offered the .smil file to either play in Real Player or save to disk. Save it. Then open it with a text editor (right-click). Inside, you will see the URL.

Elsewhere (eg. BBC Radio, here ) you will be offered a .ram file (On the BBC site, right click on 'Play in standalone Real Player' buttons). Again, save it locally and peek inside using a text editor.

In either case you’re looking for a URL which ends with a something.ra or something.rm filename.

Select and copy the URL.

Capture your Audio Stream

Now let’s get to work.

NOTE: before you start, you are going to me making some massive .wav files – approx 10MB per minute of recording. Make sure you have enough disk space for the time you want to record. You’ll need about (2.1 x 10 x recording length in minutes)MB.

Open up a terminal window:

vsound –d –t –f myfilename.wav realplay url_of_the_stream_you_want_to_rip

Realplayer will open up and play the stream (the –d parameter means you can listen while ripping). At the same time, it will generate a large Sun ULAW format file containing the stream. When it’s got what you want, close down Real Player. Sox will start up, create a .wav file from the ULAW, then delete the ULAW. This may take some time – but you can monitor it in a file browser.

Converting to .mp3

To convert the massive, unwieldy .wav to a more manageable .mp3 (approx 10% of its size), simply:

lame myfilename.wav myfilename.mp3

A dialogue will open in your terminal showing the process. Again, this may take time, depending on your processor speed and the file size. You can use Audacity to edit the .mp3 further – eg to make breaks between songs.

This information was based in part on the following article: http://www.linux-magazine.com/issue/...io_Streams.pdf

NOTES There is an alternative method just using mplayer and lame here: http://www.ubuntuforums.org/showthread.php?t=40193


CategoryDocumentation

HowToRipRealaudioStreamsToMp3 (last edited 2008-08-06 16:40:10 by localhost)