As promised, here is my Rhythmbox plugin for streaming whatever is currently playing. To install, just extract it in
This is not only my first Rhythmbox plugin, but also my first use of GTK, Glade, and GConf. I already had a little experience with GStreamer on the OLPC. Overall, the process was amazingly painless. Props to the Rhythmbox team for making the process of writing plugins so easy!
~/.gnome2/rhythmbox/plugins. I use the following alias to start playing the stream on my Chumby.alias chumbystream="ssh root@chumby btplay --output=alsa:plug:dmixer http://server:8000/stream.ogg"I also have a few troubleshooting tips.
- Make sure you haven't muted Rhythmbox. You can control the volume of the stream output using the volume control in Rhythmbox.
- Make sure your Icecast server is running.
- If Rhythmbox behaves oddly, try disabling the plugin, restarting Rhythmbox, and re-enable the plugin.
This is not only my first Rhythmbox plugin, but also my first use of GTK, Glade, and GConf. I already had a little experience with GStreamer on the OLPC. Overall, the process was amazingly painless. Props to the Rhythmbox team for making the process of writing plugins so easy!
damonkohler,
ReplyDeleteI am unable to switch songs with this plugin. If I let the songs switch by themselves (let the current song finish, auto-play the next song) then it works. But if I wish to begin playing a new song while one is already playing, then all sound output from rhythmbox ceases. Is there any possible way to fix this?
Well, the good news is, I can reproduce the issue. The bad news is, I have no idea what the problem is. If anyone has suggestions, I'm all ears!
ReplyDeleteDamon: did you find a fix?
ReplyDeleteA potential fix:
ReplyDeletehttp://pastebin.com/f51b561ff
Use this patch and set your stream receiving player (eg. VLC) to loop the song.
Wow, I didn't realize VLC can stream!!
ReplyDelete- file
- http
- mmsh
- rtp
- icecast!
Thank you for this!
ReplyDeleteI would like to improve this plugin but there is a lack of documentation for the API's you used on it. Now I'm trying to make the streaming continuously play various files from my local music library to a icecast2 server, but every time the track is over all clients stops to receive streaming.
ReplyDeleteAny tips about this?
@Marcelo Unfortunately, no. I have the same problem. I've received a few suggestions/patches from other readers but they did not fix the issue. The lack of documentation is disappointing indeed. I scraped together what I did from other examples, Rhythmbox's wiki, GStreamer docs, and poking at the Python API directly.
ReplyDelete@Damon I was reading about GstBin and found this:
ReplyDeleteA GstBin internally intercepts every GstMessage posted by its children and implements the following default behaviour for each of them:
GST_MESSAGE_EOS
This message is only posted by sinks in the PLAYING state. If all sinks posted the EOS message, this bin will post and EOS message upwards.
http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/gstreamer/html/GstBin.html#id330251
I have been toying with the idea of retransmitting the music stream we are using in a small "milonga" (tango dance event) around here. So I had to debug some problems, and found that something like:
ReplyDeleteLANG=C GST_DEBUG=1 gst-launch-0.10 -mv file:///tmp/insurreccion0.mp3 ! mad half=true ! audioconvert ! audioresample ! lame vbr=4 vbr-max-bitrate=40 ! shout2send sync=true password=mypass mount=live2 2>&1 | less
works, and the GST_DEBUG env var helps finding what goes on. Have you found any further success with the use of gstreamer in rhythmbox?
actually with "export GST_DEBUG=2" and then calling rhythmbox from command line, I get a warning which seems to be related with the plugin stopping when the song changes:
ReplyDelete0:07:53.426588852 19787 0xab47a18 WARN vorbisenc vorbisenc.c:1197:gst_vorbis_enc_chain: Buffer is older than previous timestamp + duration (0:01:40.632000000< 0:04:40.272000000), cannot handle. Clipping buffer.
(4:40 was the duration of the first song played, 1:40 is the time the second song has been running since)
Definitely, this problem was the cause: substituting "lame vbr=4 vbr-max-bitrate=40" in place of "vorbisenc ! oggmux" makes it work, and tolerate song changes, etc.
ReplyDeleteTo save newbie Debian users 5 seconds - extract the plugin into /usr/lib/rhythmbox/plugins/
ReplyDeleteThis is great, but too bad it doesn't work. It keeps rejecting the password. And yes I'm 100% sure it's correct.
ReplyDelete2011-01-11 17:49:14 I msg:[src 192.168.2.3:47049 sid=1] SHOUTcast source connection.
2011-01-11 17:49:14 E msg:[src 192.168.2.3:47049 sid=1] connection denied. Bad password.