Capturing video/audio streams to .MP3

Kick back and relax. Anything that does not have to do with footbag goes here!
Post Reply
User avatar
Telecaster
Hack Fiend
Posts: 52
Joined: 17 Oct 2004 01:17

Capturing video/audio streams to .MP3

Post by Telecaster »

Does anyone know how to capture streaming videos or audio to an .MP3 file? There are a few songs/videos I listen to that I can't find in .MP3 form. One is .asx or something, and the other is a .wma file that is a live performance from a band I like.
User avatar
Tsiangkun
Post Master General
Posts: 2855
Joined: 23 Feb 2003 02:27
Location: Oaktown

Post by Tsiangkun »

First we find the "source" of the stream . . . you probably already have this.

Code: Select all

bash $ wget http://foo.bar.baz.com/flip/songs/hhher2324.ra 

...
21:25:23 (46.88 KB/s) - `hhher.ra' saved [48]

Now to find out the URL of the stream:

Code: Select all

bash $ cat hhher.ra
rtsp://rmv8.bbc.net.uk/radio4/comedy/thu2300.ra

Cool. Now grab the stream to a file on disk. This step runs in realtime, so it will take half an hour to download a half-hour show:

Code: Select all

bash $ mplayer -dumpstream rtsp://rmv8.bbc.net.uk/radio4/comedy/thu2300.ra
(Time passes while mplayer writes a file named "stream.dump".)

Now convert the stream.dump file to pcm/wave:

Code: Select all

 bash $ mplayer -ao pcm stream.dump
(Time passes while mplayer writes a file named "audiodump.wav".)

Convert that wave file into mp3:

Code: Select all

bash $ lame --preset standard --tt "SongTitle" --ta "ArtistName" --tl "ALbumTitle"  -ty "2004"   --tn 1 audiodump.wav episode1.mp3



MPLAYER is the bomb.
User avatar
Telecaster
Hack Fiend
Posts: 52
Joined: 17 Oct 2004 01:17

Post by Telecaster »

Did you do that in Unix? I don't use Unix...
User avatar
Tsiangkun
Post Master General
Posts: 2855
Joined: 23 Feb 2003 02:27
Location: Oaktown

Post by Tsiangkun »

Download a bootable knoppix cd distribution, and use that if you want to try the unix way.

I think mplayer runs on windows too, not sure about LAME. I've been windows free since 94.
User avatar
Telecaster
Hack Fiend
Posts: 52
Joined: 17 Oct 2004 01:17

Post by Telecaster »

Oh I didn't see you were using MPlayer.

I'm downloading it now. This looks complicated, I'll let you know if I need help.

Thanks.
User avatar
Telecaster
Hack Fiend
Posts: 52
Joined: 17 Oct 2004 01:17

Post by Telecaster »

I have installed Mplayer, but when I click mplayer.exe the command window just opens for about a second then closes. I have no idea why.
Post Reply