Jump to content

Tips&Tricks How to capture realaudio to mp3


aru
 Share

Recommended Posts

 

scrat

Frequent user

Joined: 14 Jun 2002

Posts: 28

 

Post Posted: Wed Nov 06, 2002 12:44 am Post subject: How to capture realaudio to mp3

_________________________________________________________________

 

 

Hey! Finally I have found the way out! How To Record Streaming Audio... I remember posting here on this stuff some months ago. There was a problem with vsound, I was unable to pipe its stdout into lame (or into anything for that matter). Finally today I have found a clue on a mailing list archive! There is a bug in vsound: it's a script, /usr/bin/vsound, you can edit it with emacs or whatever (as root).

There is a line like:

 

if [ "$verbose" ] && [ "$VSOUND_STDOUT" ]; then

 

change it to

 

if [ "$verbose" = 1 ] && [ "$VSOUND_STDOUT" ]; then

 

(Ugly-Details-Feel-Free-To-Skip: the other way, since $verbose is always set, whenever $vsound_stdout is set, the "if" is fulfilled and it exits with an error that both verbose and -s cannot be passed together; $vsound_stdout is set if you pass the option -s to the command line, which in turn means "use stdout". So passing -s would always fail. After the modification above, it fails only if you pass both -s and --verbose).

 

After the bugfix, a simple commandline like

 

vsound -t -s -d realplay | lame -h - myfilel.mp3

 

will launch realplay under vsound, and record/encode on the fly whatever is played by realplay to myfile.mp3 ! (hit CTRL+C when you are done).Without intermediate huge wav files. Great ain't it ?

 

(Notice that this is better tha using sox to read from dsp, because there is not a double DA/AD conversion)

 

Hope you'll like it too... Scrat

 

 

scrat

Frequent user

Joined: 14 Jun 2002

Posts: 28

Post Posted: Thu Nov 07, 2002 6:27 pm Post subject:

_________________________________________________________________

 

 

Well good people, another hint if you like to record real streaming audio to mp3. If you do what I suggest in last post, you'll end up with a long .mp3 containing songs, dj voices, silence, all interspersed. You'd like to cut the songs and store them as individual mp3's with their title as filename and without voices etc, wouldn't you ? You could use audacity to do that, but this would NOT be a great idea: because audacity first decompresses the mp3, then it lets you edit it, then it compresses it again := quality loss each time you save. But there is a nifty program that cuts mp3 into pieces WITHOUT decompression/re-compression ! Of course that's all it can do, you can't aplly filters and other advanced stuff you can do with audacity. But if you only need to cut the mp3 into pieces, it's EXACTLY what you need. It's called mpcut, you can get it here:

 

http://minnie.tuhs.org/Programs/Mpcut/

 

Get the tarball, untar it , enter the mpcut-whatever directory, type

 

./autogen.sh

 

wait till'it ends, then type

 

make

 

when it's done enter the src directory, you'll find there the executable, it's called mpcut. You can run it from there, typing

 

./mpcut

 

or you can copy (become root first) it in a directory wich is in your PATH, like /usr/local/bin , so you'll have only to type mpcut to launch it.

Enjoy, and good ripping ! Scrat

 

PS Another little tip, more like an errata; I wrote "hit CTRL+C when you're done"; well, actually it is better to exit the client application, that is, realplay in the example commandline (but it could be xmms or another app, provided it uses oss-like /dev/dsp because that's what vsound intercepts). So if you click Exit on realplay, vsound will exit itself after finishing to write it's output; lame in turn will see the end of the pipe as the end of a regular file, and finish gracefully it's job before exiting. Instead CTRL+C will make lame to exit of a sudden, which sometimes produces (well, that's what happens to me) broken mp3's. Broken means I can play them all the same and they sound good, but mpg123 may complain that it can't rewind the stream (wish I knew what that means me too), and mpcut may crash while attempting to open the file.

 

 

 

Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...