Author Topic: How to capture radio streams with MusicBee using Streamripper  (Read 12037 times)

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
This write-up derives from a past suggestion by frankz in the "Wishlist" forum, a recent illustration of the flexibility of MB's External Tools feature by redwing, and various discussions in the Foobar2000 forums on use of its Run Services plugin with Streamripper.  This method does NOT require the creation of a proxy/relay stream.

1.  First, download and install Streamripper 1.64.6 (http://streamripper.sourceforge.net/).  Be sure to include the "console" option in the install. Check here for additional install techniques if desired.

2.  In MusicBee, go to Preferences/Tools, and you'll see the external applications box for invoking external applications from the "Send To" context menu.

3.  Enter a tool name in the name box, like "Streamripper"; now browse to the application path for streamripper.exe on your computer (note: you want to point to "streamripper.exe", NOT the GUI version "wstreamripper.exe").

4.  In the "parameters" box, enter the following string:

"<URL>" -z -t -u FreeAmp/2.x -d C:\Streams

Change the path C:\Streams to wherever you want to save the streams.  If your path includes space names, be sure to enclose the entire path, including the drive letter, in quotes, like: "C:\Music Streams\Saved Files"   Then, save your entry.

Now, when a radio stream is playing, you can right-click the station's entry in either "Playing Tracks" or "Now Playing", choose "Send To" and select the name for Streamripper you created.  A command window will open and display Streamripper acquiring the stream, and a kB size progression as the size of the saved file increases.  Be sure you keep the command window open (or minimized) as long as you want to rip the stream.  Exiting the command window will exit Streamripper and stop capturing the stream at the same time.

The Streamripper "readme.txt" will give you a full breakdown of available  command option switches you can use (much more complete than those found on the console tutorial at the Sourceforge site).  The ones I used above will give you named individual tracks within a station sub-directory.

This works with MP3, OGG, and AAC/AAC+ streams.
Last Edit: May 16, 2020, 01:16:39 AM by sveakul


sveakul

  • Sr. Member
  • ****
  • Posts: 2438
First, thank you frankz :)

Then, a little addendum that I missed before:

After performing the steps outlined in my original post to add Streamripper functionality to MusicBee's "Send To" context, you should go to Preferences/Hotkeys, scroll down to "Send To: External Application (now playing)", and assign that action a hotkey, like "R" for "record."  Then when a radio stream is playing and you want to start recording, just hit "R", and Streamripper will immediately open and begin to rip. NOTE: the Streamripper entry needs to be the first External Tools entry for this to work.  No need then to do the right click/SendTo/Streamripper step in the original instructions.  You'll still need to exit the Streamripper command window when you want to stop the rip.

modified 3/10/2019
Last Edit: March 10, 2019, 07:13:46 AM by sveakul

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
The installation of Streamripper asks for the location of the Winamp directory. I don't have, nor do I want, Winamp. When I left that field blank and continued the install, the installer aborted. Any suggestions? (Besides installing Winamp.)
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
Hi phred,

The installer asks for the Winamp directory because it wants to place a plugin gen_sripper.dll (NOT needed in this scenario) in the Winamp/Plugins directory.  You could create a dummy "Winamp" folder anywhere and put that in the field when asked, and then just delete that folder after the install finishes.  It's not used at all by the streamripper.exe console, which never has to look at anything Winamp-related.

Actually, you can "probably" (in quotes because I used the installer) just extract the install package with 7-zip (which does indeed extract it) into whatever folder you wish to assign to it.  Then delete the subfolders "$_4_ and "$PLUGINSDIR" and done.

I would never make you install Winamp  ;)  Have any more questions feel free to PM me!
Last Edit: February 01, 2018, 10:53:50 PM by sveakul

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
Thanks sveakul. I created the dummy WinAmp directory and ran the install. Then deleted the dummy. Initial tests are encouraging, but I'm having a problem getting it to save to my desired directory. It seems the spaces in the path are the problem and when I enclosed the path in quotes, Streamripper errors out.
This doesn't work: G:\Music Temp\Radio Streams
This does: D:\TempStuff

And since I have lots of other things pointing to G:\Music Temp it's not so easy to just change it to G:\MusicTemp.

I'll have more time to try to  configure it as I want tomorrow, but if you have any suggestions, I'd be glad to listen.

Thanks.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
It's true that you would need to put the path in quotes if there are spaces in the folder names--and I will be adding that to the tutorial, thanks!  However, my testing shows no problems when doing that.  I copied this just now right out of  my parameters window:

"<URL>" -z -t -u FreeAmp/2.x -d "C:\Temp Files\My Test"

Note the spaces in both folder and subfolder names, and the quotes around entire path incl. drive letter.  This worked fine when I tested it with Streamripper from MusicBee, no errors, and created the expected rip's subfolder and file within C:\Temp Files\My Test

Could you check that maybe you missed something in your parameter string context?
Last Edit: February 02, 2018, 08:57:19 PM by sveakul

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
Could you check that maybe you missed something in your parameter string context?
Thanks for the feedback. It's working as expected now. Perhaps it was my PC reboot that helped it recognize the quoted path. But it's now placing the rips where I want them. Now all I have to do is solve the hotkey mystery: https://getmusicbee.com/forum/index.php?topic=24314.0
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
OK phred glad to hear all is working now.  I see you solved your hotkey issue also.  Mine works fine with Streamripper assigned to the "Send To: External Application (now playing)" selection,  but I don't use any other apps with the "..(selected files)" option.  Take a look at the full ripping option switch availability in the "readme.txt" in the Streamripper directory, mine are pretty basic compared to what it's actually capable of.  Enjoy.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
OK phred glad to hear all is working now.  I see you solved your hotkey issue also.  Mine works fine with Streamripper assigned to the "Send To: External Application (now playing)" selection,  but I don't use any other apps with the "..(selected files)" option.  
Perhaps I'll try it with no other applications in the Send To, but since it's working now, and I want/need those other apps, I think I'll just leave it alone. There's an old saying "If it ain't broke, don't fix it." And right now it ain't broke.

Quote
Take a look at the full ripping option switch availability in the "readme.txt" in the Streamripper directory, mine are pretty basic compared to what it's actually capable of.  Enjoy.
I did a quick read through it yesterday and yes, there are quite a few options but I think I'm good with your original template. There's an old saying "If it ain't broke, don't fix it."  :-)
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here


sveakul

  • Sr. Member
  • ****
  • Posts: 2438
Glad to hear it!  Hopefully though "someone someday" will incorporate this into a plugin that will save FLAC and Opus streams as well without re-encoding, as is possible with XMPlay.

YuriShalk

  • Newbie
  • *
  • Posts: 4
  • Try this --> Jorge e Mateus - Seu Amor Me Tem

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
Hi phred,

The installer asks for the Winamp directory because it wants to place a plugin gen_sripper.dll (NOT needed in this scenario) in the Winamp/Plugins directory.  You could create a dummy "Winamp" folder anywhere and put that in the field when asked, and then just delete that folder after the install finishes.  It's not used at all by the streamripper.exe console, which never has to look at anything Winamp-related.

Actually, you can "probably" (in quotes because I used the installer) just extract the install package with 7-zip (which does indeed extract it) into whatever folder you wish to assign to it.  Then delete the subfolders "$_4_ and "$PLUGINSDIR" and done.

I would never make you install Winamp  ;)  Have any more questions feel free to PM me!

Just as a follow-up to the part of this old post highlighted in red, I can confirm that this method indeed works, no need to run the installer.  Just extract the contents with 7-zip into a folder like C:\Streamripper and point the application path in MB tools to the streamripper.exe in that.  Saves you from having to mess around with dummy Winamp folders and the like.  You can delete the 3 subfolders that get extracted from the installer, they won't be needed.