RecordRadio

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
5 .8
Description:

RecordRadio is a simple bash script that plugs into amarok and uses streamripper to record radio stations you listen to.
Now as of version 0.2 it can also save podcasts to your music collection!

Simply enable it as a plugin, and when you connect to any http stream it plugin will spawn a instance of streamripper that will record the songs and place them in subdirectories within a directory called "Music" in your home. Five seconds later amarok will start listening to a relay server on port 8017 so as not to use unnecessary bandwidth.
To save a podcast or remote mp3 or ogg file to your music collection, right click on it in your playlist, select "RecordRadio" and "Save Podcast". They will be saved in a directory called Music/SavedPodcasts within your home directory.

If you wish to change the streamripper options (proxy settings etc.) or the directory where things are stored right-click on RecordRadio in your script manager and click edit. These are simply variables that are set in the first few lines of the file.

Requirements:
You need to have streamripper installed. It comes as part of Debian and several other distributions. You can also download it from http://streamripper.sourceforge.net/ .
If you are using Mandriva 2006 you can get streamripper from "contrib". However for RecordRadio to work you will need to update to the latest version of Amarok due to a bug in 1.3.1
For RecordRadio to run need to have a few standard GNU commands available: (awk, egrep, ps, wget)
RecordRadio has been tested on and works with
Amarok == 1.3.7 (with xine and arts engines),
1.3.1 will NOT work!
Streamripper == 1.67.17

Note: This script will not work with Amarok 2.0. Please see: https://bugs.kde.org/show_bug.cgi?id=179015

Known Bugs:
When you start an internet radio station your playlist will be cleared. (This can be fixed as soon as the amarok developers fix the playMedia dcop call)
Because streamripper for whatever reason cannot produce metadata on demand for some stations, there may be a delay of up to 15 secounds before you can switch to the replay server. However you can continue to listen to the station live until then, and it will still get recorded. These stations may also cause amarok to be unable to report the length of recorded songs. However these can be fixed by using a plugin called MP3Fixer, and restarting amarok.
Sometimes the server is full and cannot support an additional connection for streamripper so you can't record that station, so it simply will not be recorded and you will continue to listen to it live. If this happens you will receive an error to the effect that localhost refused your connection.


If you like this plugin, please consider making a donation to the Electronic Frontier foundation: www.eff.org
Last changelog:

11 years ago

0.2.3 - Separate "always record" and "Record on demand" modes and several bug fixes.
0.2.2 - Adds menu to listen without recording.
0.2.1 - Fixed bugs mentioned by pfeifle and prevented from going out of control if amarok crashes.
0.2 - Added ability to save podcasts.
0.1.1 - Removed bug requiring output file.
0.1 - First release

blujay

14 years ago

Oops, I'm sorry, I didn't realize there was separate functionality for podcasts and streams. I just tried it, and indeed, it's recording. :)

Now, I do have a small feature request, if possible: could there be a button or menu item for recording streams, instead of doing it automatically? I don't want to record it every time I listen to it, but it'd be nice to be able to leave the script activated without it automatically recording streams.

Thanks for your great script. :)

Report

C

tkaitchuck

14 years ago

0.2.2 now has a menu to do this.

Report

blujay

14 years ago

Thanks for adding that, but wouldn't it make more sense to not record by default, and to use the menu to record it? I listen to this stream all the time, but I only record from it once in a while.

Report

blujay

14 years ago

Trying 0.2.3 now. You rock, thanks. :)

Report

markey

14 years ago

I offer to convert this script to Ruby for you, or help you convert it. If you are interested, let me know.

Report

pfeifle

14 years ago

The script doesnt work for me. I am on SUSE-10.0. I compiled streamripper successfully and can run it from the commandline just fine, even traversing the proxy I need to go through. I'm using amarok 1.3.7 with the Xine engine (no other engine works for me...) However, RecordRadio.sh doesn't work as an amarok script. The major problem is described at the end. First a few minor quirks:First, the script tries to create $PodcastDir inside $MusicDir.Next, it changes directory into $MusicDir.Then it checks if $MusicDir exists and creates it if missing.The order should rather be "3)"-"1)"-"2)", no?Also, it would be nice if you could add "-p $http_proxy" to the calling arguments of streamripper (and maybe the line 'http_proxy="$http_proxy"' to the variable definitions).The major problem is this error message:The connection was refused for the URL: http://localhost:8017/
xine parameters: http status not 2xx.Did you test the script with the Xine engine? What could be the reason for the "http status" error message?
------
In any case: thanks for the nice script -- I'm sure it is a very useful one for many people. Even if it doesn't work for me right now, it showed me just how much and how well DCOP support is already implemented in amarok, and what kind of amzing things one can do with DCOP scripting KDE applications! Thanks a lot!

Report

qurk

14 years ago

Your script works exactly as advertised. I like how it handles incomplete songs.

Report

11 years ago

0.2.3 - Separate "always record" and "Record on demand" modes and several bug fixes.
0.2.2 - Adds menu to listen without recording.
0.2.1 - Fixed bugs mentioned by pfeifle and prevented from going out of control if amarok crashes.
0.2 - Added ability to save podcasts.
0.1.1 - Removed bug requiring output file.
0.1 - First release

12345678910
1
product-maker likimoki Aug 03 2015 9 excellent
Be the first to comment
ngrocott
Dec 09 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2.3
updated Dec 29 2008
added Dec 22 2005
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2
System Tags addon