Re: [LAU] Some streaming linux audio

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Set Hallstrom <sakrecoer@...>
Cc: <linux-audio-user@...>
Date: Monday, May 6, 2013 - 6:37 pm

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:

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] Some streaming linux audio, Ken Restivo, (Sat May 4, 9:06 am)
Re: [LAU] Some streaming linux audio, Set Hallstrom, (Mon May 6, 12:23 pm)
Re: [LAU] Some streaming linux audio, Ken Restivo, (Mon May 6, 6:37 pm)
Re: [LAU] Some streaming linux audio, Set Hallstrom, (Wed May 8, 2:29 pm)
Re: [LAU] Some streaming linux audio, Carlos sanchiavedraz, (Wed May 8, 3:53 pm)
Re: [LAU] Some streaming linux audio, Set Hallstrom, (Mon May 6, 8:03 pm)
Re: [LAU] Some streaming linux audio, Patrick Shirkey, (Mon May 6, 7:40 pm)
Re: [LAU] Some streaming linux audio, Joe Hartley, (Mon May 6, 5:29 pm)
Re: [LAU] Some streaming linux audio, Set Hallstrom, (Mon May 6, 3:18 pm)
Re: [LAU] Some streaming linux audio, Carlos sanchiavedraz, (Mon May 6, 10:19 am)
Re: [LAU] Some streaming linux audio, Ken Restivo, (Mon May 6, 6:40 pm)
Re: [LAU] Some streaming linux audio, Carlos sanchiavedraz, (Tue May 7, 10:12 am)
Re: [LAU] Some streaming linux audio, Set Hallstrom, (Tue May 7, 12:48 pm)
Re: [LAU] Some streaming linux audio, Joe Hartley, (Mon May 6, 6:47 pm)
Re: [LAU] Some streaming linux audio, Folderol, (Mon May 6, 6:52 pm)
Re: [LAU] Some streaming linux audio, Patrick Shirkey, (Sat May 4, 9:18 am)