req = request.dynamic({request.create("bar:foo", indicators=get_process_lines("php get_req.php "))}) # Start building the feed with music radio = fallback(track_sensitive = false, [req, myplaylist])
<?php $host = "localhost"; $user = "user"; $base = "base"; $pass = "pass"; $link = mysql_connect($host, $user, $pass) or die(); mysql_select_db($base) or die(); $query = 'SELECT * FROM `requests` LIMIT 1 ORDER by date ASC'; $result = mysql_query($query) or die(); $line = mysql_fetch_array($result, MYSQL_ASSOC); if(!empty($line) && $line != 0){ echo $line['path']; mysql_query('DELETE FROM `request` WHERE `id` = '.$line['id'].' LIMIT 1') or die(); } mysql_free_result($result); mysql_close($link); ?>
set("harbor.bind_addr","0.0.0.0") set("harbor.max_connections",5) # пробовал set("harbor.verbose",true) # полный вывод логов set("log.file.path","./debug.log") # и в файло пишем set("log.level",5) # пишем всё что думаем set("log.stdout",true) # в stdout для отладки # Jingle Injection def smooth_add(~delay=0.5,~p=0.2,~normal,~special) d = delay fade.final = fade.final(duration=d*2.) fade.initial = fade.initial(duration=d*2.) q = 1. - p c = amplify fallback(track_sensitive=false, [special,normal], transitions=[ fun(normal,special)-> add(normalize=false, [c(p,normal), c(q,fade.final(type="sin",normal)), sequence([blank(duration=d),c(q,special)])]), fun(special,normal)-> add(normalize=false, [c(p,normal), c(q,fade.initial(type="sin",normal))]) ]) end # Music music = mksafe(audio_to_stereo(playlist("/home/service/audio/jtrance/music/"))) music = crossfade(start_next=2.,fade_out=3.,fade_in=1.,music) # Some jingles jingles = mksafe(audio_to_stereo(playlist("/home/service/audio/jtrance/jingle/"))) jingles = amplify(2., jingles) # Start building the feed with music radio = random([music]) # Mixing music and jingles radio = smooth_add(p=0.05, delay=0.3, normal=radio, special=switch([({0h0m or 0h30m }, jingles)])) #Тот самый харбор live = input.harbor("stream",port=8080,password="AZAZAazazaAZAZA",debug=true,logfile="./harbor.log") # Stream it out #Constant J-Trance Feed output.icecast(%mp3(bitrate=128), host = "localhost", port = 8000, name = "NyanServer :: Japanese Electronic Music", url="убрал ссылку. не отправлялось", genre = "Trance, JTrance, Electronic, Anime, Japanese, Vocaloid", description = "J-Trance and Japanese Electronic Music", password = "***stream pass***", mount = "jtrance", # Radio stream radio) #Live feed output.icecast(%mp3(bitrate=128), host = "localhost", port = 8000, name = "NyanServer Live :3", url="убрал ссылку", genre = "Kosherbient", description = "NyanServer :3", password = "***stream pass***", mount = "stream", # Radio stream fallback([live,radio]))
2014/01/08 13:42:24 [harbor:4] New client on port 8080: router 2014/01/08 13:42:24 [harbor:4] Header: content-type, value: audio/mpeg. 2014/01/08 13:42:24 [harbor:4] Header: Authorization, value: Basic c291cmNlOkFaQVpBYXphemFBWkFaQU==. 2014/01/08 13:42:24 [harbor:4] Header: ice-name, value: My Station name. 2014/01/08 13:42:24 [harbor:4] Header: ice-description, value: My station description. 2014/01/08 13:42:24 [harbor:4] Header: ice-url, value: тут ссылка 2014/01/08 13:42:24 [harbor:4] Header: ice-genre, value: Various. 2014/01/08 13:42:24 [harbor:4] Header: ice-public, value: 1. 2014/01/08 13:42:24 [harbor:4] Header: ice-bitrate, value: 128. 2014/01/08 13:42:24 [harbor:4] Header: ice-audio-info, value: ice-samplerate=44100;ice-bitrate=128;ice-channels=2. 2014/01/08 13:42:24 [harbor:4] Requested username: source, password: AZAZAazazaAZAZA. 2014/01/08 13:42:24 [harbor:4] Client logged in. 2014/01/08 13:42:24 [harbor:4] SOURCE request on /stream. 2014/01/08 13:42:24 [harbor:4] Adding source on mountpoint "/stream" with type "audio/mpeg". 2014/01/08 13:42:24 [harbor:4] Returned 500 for '/stream': File "tools/harbor.ml", line 354, characters 31-37: Assertion failed
let protocol = match hprotocol with | `Http_10 -> "HTTP/1.0" | `Http_11 -> "HTTP/1.1" | _ -> assert false
---------------------------------------------------------------- Installation prefix : /usr/local exec_prefix : ${prefix} binary : ${exec_prefix}/bin configuration : ${prefix}/etc/liquidsoap logging : ${prefix}/var/log/liquidsoap PIDs : ${prefix}/var/run/liquidsoap logrotate conf : ${prefix}/etc/logrotate.d man page : ${datarootdir}/man/man1 doc : ${datarootdir}/doc -------------------------------------------------------------------- Features * Supported input formats - Vorbis : yes - Theora : no (requires theora) - Speex : no (requires speex) - Dirac : no (requires schroedinger) - Flac (native) : no (requires flac) - Flac (ogg) : no (requires flac.ogg) - MP3 : yes - AAC : no (requires faad) - text-to-speech : requires text2wave (festival) and sox at runtime - XML playlists : no (requires xmlplaylist) - Lastfm : no (requires lastfm) * Supported output formats - Vorbis : yes - MP3 : yes - MP3 (fixed-point) : no (requires shine) - AAC : no (requires voaacenc) - AAC+ : detected at runtime - FDK-AAC : yes - SPEEX : no (requires speex) - Opus : no (requires opus) - Theora : no (requires theora) - Dirac : no (requires schroedinger) * Tags - Taglib (ID3 tags) : yes - Vorbis : yes - charset detection : yes * Input / output - Icecast/Shoutcast : yes - AO : yes - OSS : yes - ALSA : no (requires alsa) - Portaudio : no (requires portaudio) - Pulseaudio : no (requires pulseaudio) - JACK : no (requires bjack) - GStreamer : no (requires gstreamer) * Audio manipulation - Samplerate : yes - SoundTouch : no (requires soundtouch) - LADSPA : yes * Video manipulation - Gavl : no (requires gavl) - FFmpeg : no (requires ffmpeg) - frei0r : no (requires frei0r) - camlimages : no (requires camlimages) * MIDI manipulation - DSSI : no (requires dssi) * Visualization - Graphics : yes - SDL : no (requires sdl) - GD : no (requires gd) * Additional libraries - wget URI resolver : requires wget at runtime - dynlink : yes - inotify : no (requires inotify) - lo : no (requires lo) - magic : no (requires magic) - yojson : no (requires yojson) - windows service : no (requires winsvc) * Graphical interfaces - Python GUI : no
#Live feed output.icecast(%mp3(bitrate=128), host = "localhost", port = 8000, name = "NyanServer Live :3", url="убрал ссылку", genre = "Kosherbient", description = "NyanServer :3", password = "***stream pass***", mount = "stream", # Radio stream fallback([live,radio])) # вот fallback на live. или нужно в виде переменной его делать?
radio = mksafe(fallback(track_sensitive=false, [live,radio])) output.icecast(%mp3(bitrate=128), host = "localhost", port = 8000, name = "NyanServer Live :3", url="http://nyanserver.com", genre = "Kosherbient", description = "NyanServer :3", password = "32resfasfaewfewfewrferf", mount = "stream", # Radio stream radio)
root@srv-main:/home/namikiri# liquidsoap --version Liquidsoap 1.1.1+scm (@:20140107:154214) Copyright (c) 2003-2013 Savonet team Liquidsoap is open-source software, released under GNU General Public License. See <http://liquidsoap.fm> for more information.
root@srv-main:/home/namikiri# ocaml -version The Objective Caml toplevel, version 3.12.1
Linux srv-main 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux
set("server.telnet",true)