Ask Slashdot: Can you Convert RealAudio to MP3?
Michael McDonnell asks:
"I just purchased a Diamond Rio. I
love having portable uploadable sound but
I have absolutely no use for 99% of the MP3
content available. I spend more time
watching and listening to RealMedia
content each week than I do watching TV.
I'd like to be able to copy RealMedia
events to hard disk, convert it to MP3,
and then enjoy it on my Rio." There must
be a way to do this. Any ideas?
"The best idea that I have come up with is
to setup a full duplex sound card in my
system, attach a patch cord from line-in to
line-out and then record on 'line-in' while
I'm playing RealMedia to 'line-out'.
Then convert to MP3. I can't help but wonder
if there isn't a better way to do this in
software. Under Linux it MUST be possible...
it might even be easy. Any ideas? Perhaps
I should just lobby the makers of Real to
come out with a '.rm' to '.mp3' file
converter?"
The line-in-to-line-out idea would work, but that is something you should reserve unless there are no other alternatives due to quality degredation. I agree that there should be a way to do it in software, but that depends on the ability to, at the very least, decode RealAudio files into something intermediate that CAN be converted into MP3 format. Direct stream conversion would be better, but more complicated. How open IS the RealAudio format, anyways? I don't use it, so I don't keep up with it.
I doubt that RealNetworks would be willing to write a conversion utility for a competing format. Also, with the rash of software related cases in the courts these days, what's the likelyhood of RealNetworks suing over alleged IP violations?
The line-in-to-line-out idea would work, but that is something you should reserve unless there are no other alternatives due to quality degredation. I agree that there should be a way to do it in software, but that depends on the ability to, at the very least, decode RealAudio files into something intermediate that CAN be converted into MP3 format. Direct stream conversion would be better, but more complicated. How open IS the RealAudio format, anyways? I don't use it, so I don't keep up with it.
I doubt that RealNetworks would be willing to write a conversion utility for a competing format. Also, with the rash of software related cases in the courts these days, what's the likelyhood of RealNetworks suing over alleged IP violations?
One way would be to write a loopback audio driver, basically something with a buffer that could both be written to and read from at the same time.
This would have other benefits elsewhere.
The other problem of course is the nasty IP/patent issue with actually doing the MP3 encoding, unless this has been resolved already.
There's a program called RA2WAV floating around that will convert RA files to
Then, obviously,
I have been wresteling with this problem with both MacOS and Linux for a while now, and have come to the conclusion that it is not possible, without re-digitizing the audio comming from your computer's analog sound out, and then encoding it to MP3.
:)
This, obviously, can have shitty sounding results. For one, the Analog->Digital converters (ADCs) in most sound cards are crappy, and two, a computer is very electrically noisy, so it is hard to get a clean conversion.
Your BEST bet if you want to get better quality is to use a external ADC and get a digital-in for your computer (Lucid technologies makes an execlent board. the PC-24. http://www.lucidtechnology.com).
But hey, all this may be a little excessive for doing RA->MP3
--Pr0
You may use ALSA and read from /dev/dsp while you are playing the file with the RA player. There is no loop cable required. This way you can record the audio output without quality loss.
soundforge 4.5 converts wav to g2... there's a batch mode too... but it costs money :(
search dejanews for the word "paudio".
Some guy wrote a kernel module that let you save realaudio output while it's playing.
I never got it working, but with a bit of tweaking, it might work.
Start netscape, type ra2wav in the location field and hit enter:i te_netcenter_us&search=ra2wav ;)
http://excitesearch.netscape.com/search.gw?lk=exc
Esound includes a utility (esddsp) that lets rvplayer play sound through the esd daemon. Only thing needed is to invoke the realplayer with 'esddsp rvplayer'. Esd will then mix the sound coming from the realplayer with the other sounds being played (if any). It should not be hard to make esd dump the incoming data to a file.
/dev/dsp. Having the wrappers do the dumping should also be possible.
/dev/dsp, and to attach /dev/dsp to a device driver that will both dump all incoming data and send it to the renamed audio device. This would involve writing your own device driver, and might take more effort than the above solutions.
Esddsp works by setting LD_PRELOAD to include some wrappers that catch everything going to
A third possibility would be to rename
RealPlayer Plus G2 has a record option, but the content provider can somehow set their .ra stream so it can't be recorded. I guess this is to protect copyrighted materials, or some crap like that. Don't know how easy it is to manipulate real audio, anyone have any experiance with it? Anyways, then use ra2wav, and encode that puppy. I question the quality of any such mp3 though, since real audio isn't exactly known for its audio clarity.
The beta version of RA2WAV converts RA->MP3 directly. It is a W95 program.
I am currently beta testing the latest version of ra2wav, which supports conversion from ra directly to mp3. Coupled with x-fileget (also from 2bsys), it is really easy to download and convert just about anything.
http://www.2bsys.com/Ra2Wav/index.htm
http://www.members.tripod.com/~ladsof t/ra.htm
http://csc.smsu.edu/~strauser/RA.html
Many RA files are just G.728 files with funny headers, so you can use any G.728 decoder on them. Here is the source to one: http://www.cs.cmu.edu/afs/cs/local/mosaic/common/o mega/Web/groups/AI/areas/ speech/systems/ldcelp/
Write a fake open(F) call which looks for any process opening /dev/dsp, and instead open up a temporary file using the real open(2) call. Be sure to pass any other open(F) calls directly to open(2). You can then preload this open(F) into your process using LD_PRELOAD=openf.so.
Now run realplayer with this preload, and at the end you should have a perfect DSP copy of the original audio. This can be converted via sox to wav, and then using any of the mp3 encoders ie bladenc, mp3enc, 8hz. The process is very similar to your proposed line out cable, but without massive amounts of noise or the need for a cable.
Because this solution is silent you should be able to run several of them in parallel, and a fair portion of it can be scripted. The only bit which will require your intervention is realplayer.
AFAIK the way through the WAV format is bad because their will be side effects like aliasing in graphics or so due the different acoustics modell used by the two algorithms.
Their should be a converter wich converts the data directly based on the acoustics modell.
But I don't know if this possible and if their a converter available.
I know the commercial version of OSS can do such a task... there's a way to record all outgoing sound, and then you could just encode the resulting files. I don't know the details since I never actually used that feature though.
Install ALSA and just cat /proc/asound/card1/pcm0p > data.raw, while realplayer is decoding the data. You'll get the pure digital output data produced by RealPlayer. And guess what, it's totally free! :)
If you're stuck in Billy Boy's OS, you can still do this fairly easily, with little additional software.
Go into Control Panel->Sound, then Properties, and switch 'Adjust Volume For' to 'Recording'. Check the select box for 'Mix-Record'. Set up whatever program you want to use to record the RealAudio (icky, Audio only, I know, I told you it wasn't so good...) and start recording just like you were recording from a microphone. The sound should show up, then you can convert it to MP3 format with whatever you feel like (I use the canna encoder).
It's by no means the greatest, but hey, it works. Hope that helps. ]=)
We don't want to use RA! The whole point is to convert RA files to something else so you don't have to use RA anymore.
Since when is decoding an audio stream into a buffer in memory
and then encoding it such a tough thing? All you'd
need is the routines to decode the RA format, and you'd
be well on your way.
...work much better than MP3 at the low data rates I normally use (35-80 kbps.) Real's G2 "Music" codec at 20 kbps sounds quite good, and even rivals the quality of an MP3 encoded at 118 kbps. Speaking strictly of the quality of the sound (and disregarding licensing issues, which are significant, of course), Real produces better output than MP3 at identical bitrates.
Your milage may vary of course, but for streaming audio, Real is still my format of choice. MP3 still has a distinct advantage over Real on the cross-platform front, however. I will be happy when RealNetworks releases the Linux player and encoder.
The point of converting RA to MP3 is simple: 90% of the audio content on the Internet is in RA format. The RIO is pretty much useless for music (though MP3 is marketed as a 'music' format) because it only holds 30 minutes of music. The Rio can hold 12 hours of voice audio though!
There is next to nothing for voice audio in MP3 (you can get some lame stuff via shoutcast). There is tonnes of good stuff available via RealAudio. Of course the problem with RealAudio is that A) You have to use a computer to listen to it. B) You have to be connected to the Internet (generally speaking) to use it. C) You have to be in front of your computer to use it.
It would far more useful to get RealAudio content and listen to it on the Rio. Use the computer to AUTOMATICALLY (IE: the process would be automated) grab various RealAudio content and store it in the Rio. Then listen to it at a convienient time and in a convienient place on the Rio.
MP3 is nice, RealAudio is nice, and the Rio is nice. By themselves they are useless (to me anyways).
Step 1- Boot into windows
Step 2- use ra2wav
Step 3- re-encode the files.
Step 4- Never use amp. It'll choke on the low rate mp3's. I used the fraunhofer encoder back in my windows days. my Beatles ra->mp3 scheme worked great, sounds about as good as the LP (do NOT get me started on audio fidelity, ok?), and it barely touches cpu usage. Also, file sizes are near identical, which leads me to wonder, what IS the difference between the two schemes other than the fact that RA hardly ever goes above 32Kbit?
Also, I applaud Ask Slashdot for finally posting something useful. Somehow all of my questions always get trashed or something, and I'd say that most of them are a tad more significant than the origin of foo. Then again, what matters to one nerd may not to another.
Not AC- Forgot passwd
Christopher Kalos
Real Audio provides each of their codecs in a seperate DLL file. RA2WAV is a windoze program which simply uses the DLLs from the realaudio distribution to decode the sound files. This is pretty easy to do- the function names in realaudio's libraries give a pretty good description of what the routines do.
Hmm... slashdot's post-eater is doing it again. I seem to be able to post new messages, but can't reply to existing ones. strange.
Audio quality is not an issue. This issue is how to convieniently listen to voice audio. There is lots of RealAudio content available but you have to be in front of a computer using RealAudio to listen to that content. Quite useless!
The Rio is great for voice quality Audio because it is portable, can hold about 12 hours worth of voice audio, and only takes 5 minutes to load all the audio it can hold.
Of course the Rio only plays MP3s and there is very little content available in MP3 format (except for music... who cares about music, I've already got a tonne of portable music players, including FM radio, cd, and cassette tape).
The Rio would be very very useful if:
a) one could capture, automatically (without having to sit and do work by clicking on things) Audio content (real audio in particular)
b) automatically convert captured audio to MP3 and load it into the Rio
c) Use the Rio any place any time.
So far A) and C) are possible. B) is the tricky one because RealAudio to MP3 conversion is not readily available.
Actually tonnes of good workable solutions have been provided here! Now if Real Networks would pull the stick out of their butt and allow all streams to be recorable (and provide a Linux player that can record!). Ever seen a VCR or Radio/Tape deck that REFUSED to let you record? It's just plain silly. Prosecute criminals but let customers make FULL legal use of content.
I think they have a Real Audio input plugin on their website. you could then simply use the Disk output plugin to write the audio data to a wave.
Should be able the same way you'd convert a MP3 to Wave to write to a CD or something.
Just a thought since I hadn't seen it posted.
why dont you just take the sources out of an ra stream reader (as noted in a previous post). make it write raw pcm or wav data on stdout and pipe it to the fhg mp3 enconder (l3enc 2.x) using the stdin command line arguments? i would think this to be a rather trivial process...
You would get the data from esd by using the .wav file, and your favourite .mp3
esdmon program, as in "esdmon > somefile.raw".
From there, use sox(1) to convert the raw audio
file to a
encoder. Check http://freshmeat.net for software.
Note: esddsp only works with rvplayer on libc5
systems. Slackware users rejoice.
-- 'Ricdude
[Inane mumbling about minidisc]
Now, do you have something useful to add to the discussion, or are you just sitting around harshing on technologies you don't understand?
The man asked a question, perhaps you can offer a usable answer?
Shockwave files are MP3s with funny headers. Realaudio files are not in any MPEG format.
Realaudio files are compressed with a variety of linear predictive coders, or with Dolby AC3 in the new versions.
Maybe because he wants to listen to audio that was created and made available in RealAudio format by somebody else?
I just tested this, and it works! Here's the reg info(maybe someone already released a keymaker for this, but I got this myself, so don't come after me :)) user:Cracked by [DivineOb] reg:197.345.921.863
I've used RA2WAV and re-encoded the resulting wave files into MP3, and it works well, another solution is a program called Virtual Audio Cable. VAC can be found at http://www.ntonyx.com/vac11.html
VAC does the same thing as the analog patch cord, but keeps everything in the digital domain. It will work with ANY sound format that you have a player for...
This is sad that a bunch of geeks can't figure out how to go from realaudio to MP3. In order for realaudio to be played, it MUST be in some sort of raw format that the soundcard can understand. If that is the case, then obviously that raw format can be made into an MP3. You may look into esound if you need an easy way to capture audio, it has a nice esddsp program that lets you use any (well most) programs and have them piped through the ESD daemon that GNOME runs. ESD does need some major work though, it tends to skip and do weird things all the time.
Audible makes a mobile audio device which supports up to 2 hours of RealAudio content. See them at www.audible.com.
- Tim tim@dierks.org
...and get a MiniDisc recorder. This is one of the things that MiniDisc is really good for.
I've extolled the virtues of MD many times here, especially when the Rio comes up. In short, the sound quality will be far better, and you'll be able to stuff way more music in your pocket.
Check out http://www.minidisc.org/
Since there are no devices specifically for playing portable RA and the idea of being able to convert RA->MP3 is a fairly simple one, I'd call his expectation reasonable.
If he were wanting to return the Rio because it wouldn't play RAs, _that_ would be unreasonable.
Posted by jbharvey:
Say, why are you bothering with RA? What's so important that you need to have it in RA content? If you can at all help it, just go mp3 all the way, it's far superior.
.... unless the PC soundcard had a digital audio output (coax or optical), since most minidisc recorders support that...
NPR?
Hurry up and jump on the individualist bandwagon!
The original poster wants to convert *from* RealAudio. If all you do is listen to music then MP3 is probably all you need, but RealAudio gives you access to a whole planetfull of content. How else could i listen to i listen to Deutsche Welle Swahili programming, BBC news in English, Radio Canada International in Arabic, exerpts from the Prairie Home Companion, Radio Warsaw in Esperanto... all in my own living room? (I often do each of those things!) Only by using RealAudio! I only wish there were a little net appliance to let me listen to all of that RA content while i'm working in the kitchen.
/ audilink.html
I've got a page up on RA multilingual content:
http://ourworld.compuserve.com/homepages/leston
But you have to use intermediate programs that capture the stream going to /dev/audio (or the sound card device of choice under Windows), have a program convert the raw to a wav, then encode that wav.
/home/you/file.raw /dev/audio
Example (might work, might not. Just illustrates)...
ln
sox (or whatever) whatever -whatever
bladeenc
I dunno. I've never written a line of C in my life (other than the obligatory "Hm.. I'll try C" Hello World program). Someone else mentions a kernel module that does a similar thing...
I can do it under Windows with minimal effort (some Windows programs can record output directed to sound cards to a file), but I'm assuming that's not an option. And I haven't done it in quite some time, so...
Did you even READ the post?
He's trying to convert a media stream to MP3.
Dearie, I suspect the nice man is asking how to convert RealAudio to MP3 is because he CAN'T GET IT IN MP3.
Now run along and grow some brain cells.
Here's a nice plastic bag to play with.
I highly doubt the compression methods are the same, but your best bet would be to NOT use Real Audio at all. I'm not sure what you listen to, but if it's streaming music, Shoutcast is your best bet. I believe X11Amp supports it, but you're prolly a WinAmp user in windoze. At any rate, decoding the .ra into a plain ole wav file and then compressing it into mp3 is just about the best thing to do.
Adam "Fogie" Fogler -- Professional Paid College Student
unfortunately its only win95,98,NT program.
its at www.2bsys.com/ra2wav
There's a program for windows called Xfileget. It pretends to be realaudio, and downloads the streams (without loss) to a local file. My guess is that it would be easier to convert once you had the file local? Does anything like xfileget exist for linux (without doing raw tcpdumps? :) )
I've gotten a few MP3's made from RA files (tori amos ones).... so I'm sure that there's a windows app that'll do it. I know that the quality gets REALLY bad, tho.
Because at low bitrates, it encodes speech better than MP3. (Use the "Voice-only" 16Kbps setting to test this if you don't believe me.)
MP3 kicks the ass of just about everything else, of course, but Real does a better job with modem-bitrate voice.
I remember hearing about a realaudio > wav converter. And it's simple to convert waves to mp3s. Beyond that, I haven't a clue.
~Matt
I work with digital (speech) audio, and believe me, decoding to PCM (.wav) and then compressing it again will not sound nearly as good as the original .ra. You won't escape this by looping the line-in to the line-out, because all you are doing there is adding error introduced by the D/A and then A/D codecs on top of the errors introduced by the encode engines, not to mention line noise.
.ra to .mp3 convertor that cuts down on the mathematical errors probably has some research money waiting for them at the college of their choice.
This process is similar to editting a jpeg and then saving it again in jpeg format. The end product may be very useable (and artifacts almost unnoticeable), but keep in mind that it still isn't the ideal situation.
Of course, anyone coming up with a direct
Find it at http://source.syr.edu/~jdimpson/proj/
/proc/audio)
/proc filesystem works, how some of the soundcard works, or how loadable modules work
paudio (or
This is a loadable kernel modules and kernel patch that allows you to read and save a copy of the data currently being played by the soundcard. This allows you to save any data being played, regardless of what software is used to play it, or what format the data is in.
Some audio streaming software doesn't allow audio data to be saved to disk, and some use formats whose specifications are not publically available. This is a way around these problems. Check out the announcement and LSM entry.
This is useful also for anyone interested in how the
Read the original article. The original dilemma was that the user wanted to capture the sound from an already existing RealMedia file, convert it to MP3, then send it to his Rio.
Other people have made comments much the same about RealMedia files and their horrible quality; no one disagrees with that. However, some people encode things in RA to begin with, and the end-user who wants to make NPR audio segments or something portable (e.g., in MP3 format) is left with no outlet. The problem is not how bad RA sounds; it's in how poorly it translates to other formats.
s#
s#
the next tinghy is SHOUTcast
www.shoutcast.com (from the makers of WinAmp)
i don't know if there are any linux-players however that support this live-mp3 format...
I found a nice little program called total recorder on the download.com website. It only records 40sec. at a time until you register it, but it basically installs itself as a windows sound system device. When you're not recording, it simply changes its pointers to send it to your soundcard like normal, but when you have total recorder open, it takes the data to disk in real time while redirecting it to the speakers as well. Excellent program.
Asmodean
True science means that when you re-evaluate the evidence, you re-evaluate your faith.
Lots of good ideas here for avoiding A/D D/A conversion losses, but what about the issues with recompressing compressed audio? Is there anyone out there with a smart way to minimize these effects?
Ok, I know that one possible and most easiest way to convert your RA files to MP3, would be to somehow save the Real Media content, Get a RA plugin for Winamp, then using the Disk Writer Plugin, make a wave file, then encode it into mp3, and poof! You've got one that you can put on your RIO. Hope that helps! David Reichert
Winners never quit, quitters never win... But people who never win and never quit are idiots.
There's one really BFBI method thanks to the oddities of UNIX - delete /dev/dsp (or better, rename it and create a link so you don't have to muck around with mknod later) and rvplayer will mindlessly dump its output into a file where /dev/dsp was. Or if you want to be really snazzy, write a bit of code that creates a socket at /dev/dsp and real-time pipes it to your card...
Or better yet, why bother? Is there anything in RA that you really need to archive and play at high efficiency?
why did you purchase an mp3 player that costs so much if you dont even want to listen to mp3 files. ra sucks. if you want to hear ra then hear it for free on your free ra player. if you want portable mp3 then buy the player from diamond. i could understand this if ra sounded almost decent
define decent. my 20 dollar walkman can play am better than a way-too-high bitrate ra file. the 200 dollar price for the rio is too high to listen to an ra file. i just bought a cd player for 50 bucks and it plays cd's at cd quality.