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 Replies to “Rhythmbox Stream Recording Plugin”

  1. Hi.
    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. Hello!
    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. Pingback: streamripper
  4. Hi
    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!!!

  5. Hi!
    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.

  6. 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.

  7. 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? :)

  8. 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!!!

  9. 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.