Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Rip MP3 and windows media streams from the command line UNIX
I was kinda bummed that I had to use Windows to save audio/video streams to disk with StreamBox VCR. I wanted an app to use on my Mac to do this. People suggested stuff like WireTap which simply hijacks the system's sound before it hits the speaker (or some such). Then I found that mplayer, which can do the trick, has been ported to OS X. You will need the command line version to do this. But the syntax is:
 % mplayer -dumpfile outputfile -dumpstream streamurl
Example:
 % mplayer -dumpfile some_wm_file.wmv -dumpstream mms://some.stream.here
It works!

[robg adds: This hint also works for RealMedia (.rm) files -- ie RealMedia and RealVideo.]
    •    
  • Currently 2.40 / 5
  You rated: 2 / 5 (5 votes cast)
 
[37,111 views]  

Rip MP3 and windows media streams from the command line | 23 comments | Create New Account
Click here to return to the 'Rip MP3 and windows media streams from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Rip MP3 and windows media streams from the command line
Authored by: nlspls on Dec 05, '03 10:56:16AM
If you don't like the command line you can try this StreamRipperX.
It spilts the stream into indivdual files and keeps the mp3 tags intact.

[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: cryptlib on Dec 05, '03 06:10:22PM

StreamripperX doesn't appear to support anything but MP3, unfortunately. Mplayer gives you WMV, which is kinda nice, but being able to grab RealAudio would be the kitties' titties. Currently, I use a couple of Windows tools in VPC for this, but they make me feel so....dirty. Hopefully, these tools will come along soon, since Real supposedly opened up their "protocol books".

---
% kill -H -1



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: bluehz on Dec 05, '03 06:22:27PM

There are several utilities that work to grab RealAudio including AduioHijack (not the pro version that requires Application Enhancer - BLECH PATOOEEE PATOOEE!), RadioLover and Raw all do an excellent job of recording internet audio. I recently ran into Raw and was very excited by its claim to "record internet radio direct to MP3 or AAC format". This is by far optimal as all other utilities record to AIF format - which if you have ever recorded a long sequence - ten you know it can generate HUGE files! So I tried RAW and it is a very slick utility including a built in browser but its claim of recording direct to AAC or MP3 is a bit misleading. It actually records to AIF format then converts to the other format after completion - so you still need all that HD space.

My personal favorite is Audio Hijack (NOT APE Audio Hijack Pro), it does a fantastic job.

I have been wondering about these apps and their process of hijacking the audio output (which is basically what they all do). If we could find out how that is done - it would open up all sorts of possibilities including CLI recording and piping to an AAC encoder direct. Anyone have any ideas how that whole deal works?



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: gdanko on Dec 06, '03 02:46:33AM

You can get the Real Media codec to stream/rip Real files. You can download the command line version at the Sourceforge home page. :)

I have both the CLI and GUI versions.



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: amacaulay on Dec 06, '03 01:10:50PM

Where is it? "No matches found for macos real media" Andy.



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: wantmore on Dec 06, '03 02:06:24PM

I searched sourceforge but could not find it.
Any hints? Tnx!



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: wayne t on Apr 12, '05 12:52:41AM

have a browse at http://www.linuxlinks.com/Software/Multimedia/Tools/



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: gdanko on Dec 06, '03 02:44:55AM

StreamRipper won't rip Windows Media or Real Media. :(



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: blgrace on Dec 06, '03 07:27:01PM

You could also try WireTap from Ambrosia, it only does AIFF but it grabs sound from any source as it plays..streams, games DVD etc.

[url]http://www.ambrosiasw.com[/url]



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: osxpounder on Jun 09, '04 02:42:11PM

Glad WireTap got mentioned here; I am trying it right now and am successfully recording a speech played back by RealOne [free] player. I can't save the file in Real [I don't know whether the free player even allows saving, or whether this particular file isn't save-enabled], but I'm getting fine AIFF recordings of it. One problem that has nothing to do with WireTap: The Real player keeps stopping, every 15 minutes or so, forcing me to find the place in this speech where we left off recording, then start a new WireTap recording. So perhaps we can't count on unattended recording of some streaming audio ... nevertheless, WireTap is cool, and your mentions of it on this site are much appreciated here.

---
--
osxpounder



[ Reply to This | # ]
MplayerOSX
Authored by: nvdingo on Dec 05, '03 11:43:29AM

if you search version tracker for mplayer, you will find mplayer OSX which has a GUI. i don't know if you can set the dumpfile option, but it is sure handy for playing all the different media formats.

it does include mplayer command line as well.



[ Reply to This | # ]
mmsclient
Authored by: mzs on Dec 05, '03 02:21:53PM
Or you can try mmsclient. I have tried this on MacOS X and it compiles and runs fine. This works for MMS streams. There is also a xine plugin available on that page.

[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: macman13 on Dec 05, '03 04:24:17PM

I am having trouble with the compilation on 10.3.1. I get the following errors after running make:

make[1]: *** [ppc/dsputil_ppc.o] Error 1
make: *** [libavcodec/libavcodec.a] Error 2


Any ideas?

Thanks.

---
\\\"I can do everything on my Mac I used to do on my PC, plus alot more ...\\\"
--Me



[ Reply to This | # ]
use Fink
Authored by: macubergeek on Dec 05, '03 07:29:31PM

mplayer is available under FINK

jamesk @ /Users/jamesk@Xmac-->fink list mplayer
Information about 1868 packages read in 4 seconds.
mplayer 0.90.0-13 MPEG 1/2, .ogm and AVI movie player
mplayer-font [virtual package]
mplayer-font-ar 0.1-1 Subtitle font for mplayer
mplayer-skin [virtual package]
mplayer-skin-av 1.5-1 Avifile-like skin for mplayer
mplayer-skin-bl 1.0-1 Blue skin for mplayer
mplayer-skin-bl 1.0-1 Blue skin for mplayer
mplayer-skin-de 1.7-2 Default skin for mplayer
mplayer-skin-mi 1.5-1 Midnight Love skin for mplayer



[ Reply to This | # ]
Use binary from site
Authored by: extra88 on Dec 05, '03 09:18:59PM
I downloaded the binary from the location provided by ffmpegX. The ffmpegX installer put it in /usr/bin/ for me. Works for me (10.3.1).

[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: c15zyx on Dec 06, '03 06:22:04AM

If you really want to compile mplayer/mencoder yourself, make sure you have SDL installed (and have applied the yuv anti-flicker patch), download the mplayer and ffmpeg source code from cvs (1.0pre2, recent as it is, doesn't have the necessary changes for darwin-style altivec), move the libavcodec folder from ffmpeg to the mplayer folder (called 'main' from cvs). Then just ./configure with '--disable-macosx' (yes, thats disable otherwise you will have linker problems), then make, then make install.
As a side note this is a good way of keeping mencoder up to date (have access to new advanced options such has cbp and mv0) without having to rely on the ffmpegx team or fink (whose versions are sometimes older and slower, ie their mp3lame package).



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: macman13 on Dec 09, '03 06:31:58PM

What about AudioHijack? This hijacks the application itself I believe. It can take sound from any app including Realplayer and produce MP3.

---
\\\"I can do everything on my Mac I used to do on my PC, plus alot more ...\\\"
--Me



[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: elmimmo on Dec 12, '03 08:33:26AM

Does not work with http://asx.pod.tv/sega/free/movie/atom_pr_500.asx. I tried typing

mplayer -dumpfile atom_pr_500.wmv -dumpstream http://asx.pod.tv/sega/free/movie/atom_pr_500.asx

and

mplayer -dumpfile atom_pr_500.wmv -dumpstream mms://dca.pod.tv/sega/free/movie/atom_pr_500.wmv

and

mplayer -dumpfile atom_pr_500.wmv -dumpstream mms://end.pod.tv/sega/free/movie/atom_pr_500.wmv

But it just gave me an unplayable 4 KB file. WMP 9 does play the file, so I do not know why mplayer does not get to load a byte of it.



[ Reply to This | # ]

Rip MP3 from Quicktime streams
Authored by: macubergeek on Feb 13, '04 04:04:34PM

Anyone know how to do this with quicktime streams and not WMS?



[ Reply to This | # ]
Submitted as as new hint...
Authored by: robg on Jul 06, '04 09:31:58AM
But in my opinion, it's just an expansion on this one, so here's 'anonymous' comment:
After getting bored of watching buffering counters slowly count up to 100% in Windows Media Player and Real(One)Player, I stumbled across an old hint (Rip MP3 and windows media streams from the command line). Reviewing this, I downloaded the latest binary on mplayer compiled for Mac OS 10.3. Using the -dumpfile and -dumpstream command, I was able to capture (and watch flawlessly) Windows Media and Real Media streams (namely 'Alan Alda in Scientific American Frontiers' at http://www.pbs.org/saf). Previous versions did not allow Real Media streams, but the addition is a welcome one.

The easiest way to find the Windows Media or Real Media URL is to drop the little RM or ASF file on TextEdit and copy the mms or rtsp address from there into mplayer in the command line (they are easy to download: type in the address for the ASF or RM file in Safari, "grab" the little icon at the far left of the address and "drop" it into the download window).

After you know the address, open mplayer in the command line and use the -dumpfile and -dumpstream commands:

% mplayer -dumpfile ???.wmv -dumpstream mms://copied.url.here
or
% mplayer -dumpfile ???.rm -dumpstream rtsp://copied.url.here


Remember to replace the mms://copied.url.here or rtsp://copied.url.here with your own URL (from TextEdit) and the ??? with your desired file name (with the appropriate extension)!
-rob.

[ Reply to This | # ]
Submitted as as new hint...
Authored by: chyna4xena on Jul 06, '04 08:49:32PM
When viewing and copying the rtsp URL out of the file for use on the command line, remember to properly escape special characters. One site uses a
!
character in all its rtsp URLs, which has to be entered as
\!
on the command line (whether quotes are used or not).

I had trouble getting any version of mplayer to rip and dumpfile certain rtsp streams (most streams worked, though), in particular, the vids off the Australian Big Brother site.

After several days of messing around, the solution that worked for me was to download the RealPlayer 8 PPC codecs from the mplayer site, then download and build the live.com streaming libraries (the docs tell you where to place the RealPlayer PPC codecs) and finally building mplayer v1.0pre4 (with the options set to include streaming, of course).

It took an age to go through all this nonsense, but I have since not encountered an unrippable rtsp stream anywhere.


[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: LC on Dec 23, '04 09:21:58PM
I use this method to save RTSP files locally. MPlayerOSX2 tends to play these files without a problem ... I believe it's because a few months back I copied some decoders to /usr/local/lib/mplayer. If I rename that directory, then MPlayer won't play RM files.

I recall on my other system, there was a symlink (under /usr/bin) to mplayer, not sure where it came from or whether I created it some time. Anyway, in this particular hint, if someone doesn't know how to locate the binary, here is the pathname you can try --

/Applications/MPlayer\ OS\ X\ 2.app/Contents/Resources/mplayer.app/Contents/MacOS/mplayer,

Note, there are 3 escaped space characters in "MPlayer OS X 2"; There's no real linefeed in the pathname above ... Larry.

[ Reply to This | # ]
Rip MP3 and windows media streams from the command line
Authored by: LC on Dec 23, '04 09:24:37PM

Oops, I got bitten by the stripslashes again ... there are three backslash characters in the pathname above (preceding each whitespace character) and I should have doubled them, after the posting preview they disappeared. No comma at the end of the line either (my goof) Larry.



[ Reply to This | # ]