Hello list,
Today I started the second part of my migration to liquidsoap: moving live
streams. This is my actual code:
____________________________________________________________
#!/usr/local/bin/liquidsoap -v
set log.dir = "/tmp"
set socket = false
#WORKING CODE
live = input.http("http://DOMAIN:8000/mount_point")
die = fallback(track_sensitive=false,[live,
playlist.safe("/path/to/playlist.txt")])
output = output.icecast.mp3(mount="test.mp3",bitrate=64,host="localhost",
port=8000,user="xxxx",password="xxxx",die)
____________________________________________________________
SUGGESTIONS ARE MORE THAN WELCOME!!
Also, have a fork code for local streamings:
____________________________________________________________
stream = mksafe(playlist("/path/to/playlist.txt"))
die = fallback(track_sensitive=false,[stream,
playlist.safe("/path/to/playlist.txt")])
output = output.icecast.mp3(mount="test.mp3",bitrate=64,host="localhost",
port=8000,user="xxxx",password="xxxx",die)
___________________________________________________________
It works well, if i kill the "live" or "stream" source, the users are moved to
"die" and backed to "live" or "stream" when i restart them.
QUESTIONS:
1) Is possible to include any code that tries to restart "stream" when it fails
and the users are moved to "die" ?
2) Is liquidsoap able to notify me if "stream" fails? it could be an e-mail =)
or at least a line written on a particular log... anything
3) Can i make a source to kill itself at specific hours? it would be fantastic
for smart changes in the playlist, instead of me killing the .liq, changing the
playlist and restarting it. (to be honest i use cron, but dont think "kill -9"
is the best approach)
Thanks for your help
Jorge
PS: if the answers are YES, send me an example! :)
-------------------------------------
Saca tu propia cuenta de email gratis en Colombia entrando a
http://mail.conexcol.com