As promised, here is my Rhythmbox plugin for streaming whatever is currently playing. To install, just extract it in ~/.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!
9 comments:
damonkohler,
I 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!
Damon: did you find a fix?
A potential fix:
http://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!!
- file
- http
- mmsh
- rtp
- icecast!
Thank you for this!
I 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.
Any 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.
@Damon I was reading about GstBin and found this:
A 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
Post a Comment