getmusicbee.com

Support => Tips and Tricks => Topic started by: sveakul on December 08, 2017, 12:24:27 AM

Title: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on December 08, 2017, 12:24:27 AM
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 (https://getmusicbee.com/forum/index.php?topic=23506.msg140268#msg140268) 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.
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: frankz on December 08, 2017, 03:42:00 AM
Man, that is brilliant. Great work.
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on February 01, 2018, 03:32:29 AM
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
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: phred on February 01, 2018, 08:07:01 PM
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.)
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on February 01, 2018, 10:44:04 PM
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!
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: phred on February 02, 2018, 04:28:18 AM
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.
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on February 02, 2018, 08:51:45 PM
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?
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: phred on February 02, 2018, 09:10:14 PM
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
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on February 03, 2018, 03:28:07 AM
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.
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: phred on February 03, 2018, 03:46:12 AM
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."  :-)
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: Freddy Barker on April 26, 2019, 07:58:43 PM
Totally awesome - Thanks  ;D
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on April 26, 2019, 08:09:08 PM
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.
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: YuriShalk on October 24, 2019, 02:56:22 PM
Thanks! I'll try it
Title: Re: How to capture radio streams with MusicBee using Streamripper
Post by: sveakul on May 16, 2020, 01:15:41 AM
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.