Rhythmbox Stream Recording Plugin

Rhythmbox Stream Recording Plugin

Something I wanted to write for ages was a plugin for Rhythmbox to allow saving the currently played back stream to a file like streamripper does for instance.

Well, today I quickly wrote one which you can find attached in the related bug report #320233.

It turned out to reveal a couple of issues with the involved components so consider it very experimental and ugly.

For those who still want to try it extract the archive from the bug report it to your ~/.gnome2/rhythmbox/plugins/ directory, restart Rhythmbox and enable the “Stream Recorder” plugin.

Make sure your GStreamer installation has the plugins “lame“, “id3v2mux” and “gnomevfssink” (check output of “gst-inspect“).

It adds a button in the toolbar which if enabled, will cause a file being written onto your desktop for anything Rhythmbox plays back.

Record Button

If you change the song entry it will create a different file. For radio streams, splitting individual files does not work yet (gnomevfssink does not allow setting location property when the pipeline is in PLAYING or PAUSED state) and you have to toggle the recording button if the metadata for the radio station changes to cause the plugin to write to a new file.

Rhythmbox Radio Source

As noted it still has issues so toggling recording while playing back might screw up things. It also only encodes the stream into a MP3 file. Using the selected GNOME Audio Profile of the user instead is something which needs to be implemented yet.

Recorded file using the stream recorder plugin

This plugin should provide a testing ground and allow to fix all issues with using the tee recording functionality in GStreamer and Rhythmbox.

Update 17/12/07: The latest version now uses your currently set GNOME Audio Profile for encoding (thus MP3/OGG/AAC…), writes ID3 meta-tags and automatically splits tracks from radio streams.

18 Responses

  1. aphelion says:

    I realy love this plugin. The concept and idea is perfect and needed. I only can’t get the last part (writing the file to Desktop) to work. I’m a quite basic user so hope you can help out. Here is my terminal output when trying to record in rhytmbox.

    Traceback (most recent call last):
    File “/home/cyrano/.gnome2/rhythmbox/plugins/recorder/recorder.py”, line 270, in toggle_recording
    self.set_recording (True)
    File “/home/cyrano/.gnome2/rhythmbox/plugins/recorder/recorder.py”, line 278, in set_recording
    p.add_tee (self.encoder_bin)
    AttributeError: ‘__main__.RBPlayerGst’ object has no attribute ‘add_tee’

    Thanks again for a great plugin

  2. Ivanoff says:

    But I can not make it to work. The same logs:
    File “/home/supervisor/.gnome2/rhythmbox/plugins/recorder.py”, line 270, in toggle_recording
    self.set_recording (True)
    File “/home/supervisor/.gnome2/rhythmbox/plugins/recorder.py”, line 278, in set_recording
    p.add_tee (self.encoder_bin)
    AttributeError: ‘__main__.RBPlayerGstXFade’ object has no attribute ‘add_tee’
    Traceback (most recent call last):
    File “/home/ivan/.gnome2/rhythmbox/plugins/recorder.py”, line 272, in toggle_recording
    self.set_recording (False)
    File “/home/ivan/.gnome2/rhythmbox/plugins/recorder.py”, line 280, in set_recording
    p.remove_tee (self.encoder_bin)
    AttributeError: ‘__main__.RBPlayerGstXFade’ object has no attribute ‘remove_tee’

  3. admin says:

    Your Rhythmbox version appears to be too old.

  4. Ivanoff says:

    It is the most recent in Ubuntu repositorium… I guess, your plugin was made for 8.04 Ubuntu?

  5. streamripper says:

    […] saving the currently played back stream to a file like streamripper does for instance. Well, todayhttp://blog.sukimashita.com/2007/12/09/rhythmbox-stream-recording-plugin/Security vulnerability in StreamripperRipping malicious internet radio broadcasts using streamripper […]

  6. Jogi says:

    I just have to fall in with the others, this is a great plugin!
    I’m wondering whether you’re still working on that plugin from time to time? It still got some lacks, I’m not able to get it to write down the id3-tags, and rhythmbox is crashing when I toggle to the next song manually…
    I’m trying to fix it by myself as I started programming recently, but I’m still a poor beginner and don’t know what the pb-module does, therefor I’m only making little progress, but anyway… it’s a possibility to improve my skills ;-)

    Thx for the great Plugin!!!

  7. chillum says:

    where can i find the updated version ?



  8. admin says:

    The “updated/latest” version 0.1.0 is attached to the bug report here.

    However I switched to Banshee now and will look into porting this as a plugin for that media player sometime.

  9. lixujia says:

    I believe this plugin is the thing I search for a long time. I’ve downloaded the newest version. It’s very easy to use.
    But there is still a problem, when I was using it to record “fm music”, I found that it could just record the first music. When the music being changed, the rhythmbox started playing and recording.
    I cannot understand python, so I have no idea about it.
    Maybe you can fix it in next version.

  10. Geri says:

    Great plugin! It works like charm! Excellent work!

    Thanks a lot!

    Hugs! :D

  11. Andre says:


    another nice stream recorder for Rhythmbox:
    Rhythmbox Record Station Plugin

  12. scrawl says:

    Its like that famous, huh ? :D
    BTW, link has changed: http://scrawl.bplaced.net/projects/record-station/

  13. UbuntuFan says:

    C’mon guys I can’t believe we all get this wonderful plugin to work by following the instructions on this very same page but we still don’t have a minute to stop and say thanks to this wizard? Works great for Ubuntu 9.04 Jaunty Jackalope though you can’t risk hitting the record button AFTER you hit play – it freezes things up – just hit it a second before you select the track to play or is coming up (if already playing). Or just keep recording and delete unwanted stuff later.

  14. Ronak says:

    Thanks a lot for this plugin. I’ve been using it for a year now and I’m still surprised it’s not included with Rhythmbox. This is so useful whenever I find a great song playing on shoutcast/icecast/last.fm, I just hit the button and there’s my very nice recorded file. I just wish we had a UI to set the location of where the files go.

    I’ll try to learn some python and update the code. But what compiler do I use for python and can I test the code in a compiler without piping it through rhythmbox? :)

  15. Frank says:

    I have also switched to Banshee and made the effort to port the plugin as a Banshee Extension. I’ve finally got it working: http://gitorious.org/banshee-stream-recorder


  16. Jogi says:

    Am I doing something wrong here or is it impossible with the new version to record last.fm?
    i’ve used the … old… plugin for a year and just now recognized that there’s a new version out :D

    anyway, keep that good work up!!!

  17. Jens says:

    Great plugin !
    Works with Ubuntu 10.04 (Rhythmbox 0.12.8).
    Rhythmbox gives error:
    Traceback (most recent call last):
    File “/home/xxx/.gnome2/rhythmbox/plugins/recorder/recorder.py”, line 142, in on_extra_metadata_notify
    teepad.set_blocked (True)
    AttributeError: ‘NoneType’ object has no attribute ‘set_blocked’
    But the plugin is working anyway ;-)

Comments are closed.