Re: [LAU] Some streaming linux audio

From: Ken Restivo <ken@email-addr-hidden>
Date: Mon May 06 2013 - 21:36:57 EEST

Great, glad you're enjoying it!

As others have noted, liquidsoap does the auto-failover pretty trivially. It's a great system; I recommend it.

The liquidsoap script has some passwords in it, once I remove those and put them in a separate conf file, I'll post the source of it on github or similar. It's nothing terribly fancy.

The only tricky bit was saving the now-playing, which has to be sent to a different webserver which hosts the player (cross-site origin policy on AJAX, sigh).

That's basically this:

def log_meta(m)
  foo=json_of(m)
  ignore(http.post(data=foo,
                   headers=[("Content-Type", "application/json")],
                   "http://main-site.com/update-player.php"))
  system("echo #{quote(foo)} > /tmp/now-playing &")
end

s = on_metadata(log_meta, s)

Liquidsoap is extremely cool and has its own JSON parser and HTTP client built in. So it's basically posting the now-playing to the webserver, which is then serving it up via AJAX using the Javascript you saw.

Yes, these guys are very much interested in open source audio, if anyone wants to DJ a show for them. I've helped a couple of them get linux running on their laptops now, and one of them found an old MOTU interface laying around, which just screams to be plugged into a Linux PC running Ardour.

-ken

--
-------
On Mon, May 06, 2013 at 02:23:15PM +0200, Set Hallstrom wrote:
> Sweet!
> We run a similar setup for our music syndicate, with MPD playing while
> no liveshow is up. When we take over the antenna from MPD, we use the
> risky yet very well working "move clients" in the icecast2 interface. I
> know it's a bit hacky, but since we are not adressing so many listeners,
> it works fine for now. If you have any interest, you can check it out
> here: http://basspistol.com/radio
> 
> I am really curious as how you feed the "Now PLaying" to the page. Could
> you point me in the direction of a howto or let me know how you did?
> 
> Thank you very much for the music!
> 
> *Set
> 
> On 2013-05-04 11:06, Ken Restivo wrote:
> > I've been helping out lately setting up some streaming audio for these guys:
> > 
> > http://www.spaz.org
> > 
> > On a few of the recent live shows I've actually pulled out my old EEE netbook and keyboard, and done some jamming along with the DJ's. Fun stuff.
> > 
> > Their audio is now running liquidsoap and icecast, on a Linux server, with archives playing in jukebox rotation, interspersed with new fresh live streams at various times of the day and night. When their website gets redone, the schedule will be shown.
> > 
> > Very much a work in progress, but if you want to hear some interesting and eclectic music, the stream is 24/7 now.
> > 
> > It's an in-broswer player, but there's also a link to the m3u file for mplayer, Amarok, RhythmBox, VLC, etc.
> > 
> > -ken
> > _______________________________________________
> > Linux-audio-user mailing list
> > Linux-audio-user@email-addr-hidden
> > http://lists.linuxaudio.org/listinfo/linux-audio-user
> > 
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user@email-addr-hidden
> http://lists.linuxaudio.org/listinfo/linux-audio-user
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue May 7 00:15:01 2013

This archive was generated by hypermail 2.1.8 : Tue May 07 2013 - 00:15:01 EEST