radio = mksafe(smooth_add(delay=0.5,p=0.2, normal=list, special=live))
mus = amplify(0.1,mksafe(playlist("/data/radio/music"))) fon = amplify(0.1,mksafe(playlist("/data/radio/fon"))) radio=add([mus,fon])
[23:04:31] kochegizov: вот сконфигурировалось [23:04:32] kochegizov: ---------------------------------------------------------------- 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 : no (requires vorbis) - 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 : liquidtts will use "false" as a synthetizer, but you can edit it later. - XML playlists : no (requires xmlplaylist) - Lastfm : no (requires lastfm) * Supported output formats - Vorbis : no (requires vorbis) - MP3 : yes - AAC : no (requires voaacenc) - AAC+ : no (requires aacplus) - SPEEX : no (requires speex) - Theora : no (requires theora) - Dirac : no (requires schroedinger) * Tags - Taglib (ID3 tags) : yes - Vorbis : no (requires vorbis) - charset detection : no (requires camomile) * Input / output - Icecast/Shoutcast : yes - AO : yes - OSS : yes - ALSA : no (requires alsa) - Portaudio : no (requires portaudio) - Pulseaudio : yes - JACK : no (requires bjack) - Old JACK : no (requires jack) - opal : no - GStreamer : no (requires gstreamer) * Audio manipulation - Samplerate : yes - SoundTouch : no (requires soundtouch) - LADSPA : no (requires ladspa) * Video manipulation - Gavl : no (requires gavl) - camlimages : * MIDI manipulation - DSSI : no (requires dssi) * Visualization - Graphics : yes - SDL : no (requires sdl) * Additional libraries - magic : no (requires magic) - lo : no (requires lo) * Graphical interfaces - Python GUI : no ----------------------------------------------------------------------------- The Savonet Team thanks you for using liquidsoap... Now, run make to compile, and as root make install to install, and... Have fun! -bash-3.2# [23:05:26] kochegizov: а дальше такое [23:05:26] kochegizov: -bash-3.2# make grep: PACKAGES.default: No such file or directory for i in ocaml-cry-0.2.0 ocaml-ao-0.2.0 ocaml-pulseaudio-0.1.1 ocaml-mad-0.4.2 ocaml-taglib-0.1.4 ocaml-lame-0.3.0 ocaml-samplerate-0.1.1 ocaml-dtools-0.2.2 ocaml-duppy-0.4.0 ocaml-mm-0.1.0 liquidsoap-1.0.0-beta2.1; do make -C $i || exit 1; done make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[3]: `cry.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[3]: `cry.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-cry-0.2.0' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[3]: `libao_stubs.a' is up to date. make[3]: `ao.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[3]: `libao_stubs.a' is up to date. make[3]: `ao.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-ao-0.2.0' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[3]: `libpulseaudio_stubs.a' is up to date. make[3]: `pulseaudio.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[3]: `libpulseaudio_stubs.a' is up to date. make[3]: `pulseaudio.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-pulseaudio-0.1.1' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2' make -C src make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[3]: `libmad_stubs.a' is up to date. make[3]: `mad.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[3]: `libmad_stubs.a' is up to date. make[3]: `mad.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-mad-0.4.2' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[3]: `libtaglib_stubs.a' is up to date. make[3]: `taglib.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[3]: `libtaglib_stubs.a' is up to date. make[3]: `taglib.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-taglib-0.1.4' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' make[3]: `liblame_stubs.a' is up to date. make[3]: `lame.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' make[3]: `liblame_stubs.a' is up to date. make[3]: `lame.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' rm -f lame_dynlink.cmi make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-lame-0.3.0' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[3]: `libsamplerate_stubs.a' is up to date. make[3]: `samplerate.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[3]: `libsamplerate_stubs.a' is up to date. make[3]: `samplerate.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-samplerate-0.1.1' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2' make -C src make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[3]: `dtools.cma' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[3]: `dtools.cmxa' is up to date. make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2/src' make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-dtools-0.2.2' make[1]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0' make -C src all make[2]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0/src' make[3]: Entering directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0/src' ocamlc.opt -thread -c -cc "gcc" -ccopt "-fPIC -g -O2 -Wall -DCAML_NAME_SPACE \ -DPIC \ -I/usr/lib/ocaml/pcre -o duppy_stubs.o " duppy_stubs.c duppy_stubs.c:23:30: error: caml/unixsupport.h: No such file or directory duppy_stubs.c: In function 'ocaml_duppy_write_ba': duppy_stubs.c:50: warning: implicit declaration of function 'Caml_ba_data_val' duppy_stubs.c:50: warning: initialization makes pointer from integer without a cast duppy_stubs.c:56: warning: implicit declaration of function 'write' duppy_stubs.c:60: warning: implicit declaration of function 'uerror' duppy_stubs.c:60: error: 'Nothing' undeclared (first use in this function) duppy_stubs.c:60: error: (Each undeclared identifier is reported only once duppy_stubs.c:60: error: for each function it appears in.) make[3]: *** [duppy_stubs.o] Error 2 make[3]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0/src' make[2]: *** [byte-code-library] Error 2 make[2]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/root/liquidsoap-1.0.0-beta2.1-full/ocaml-duppy-0.4.0' make: *** [all] Error 1 -bash-3.2#
# ============================================================================ # Finally, the mandatory lib dtools, duppy and liquidsoap... # ============================================================================ ocaml-dtools ocaml-duppy ocaml-mm liquidsoap
#!/usr/local/bin/liquidsoap set("log.file.path","/tmp/nonstop.log") set("init.daemon",true) set("init.daemon.pidfile",false) # telnet server для использования liGUIdsoap set("server.telnet", true) # функция кроссфейда, здесь желательно ни чего не менять def crossfade(~start_next,~fade_in,~fade_out,s) s = fade.in(duration=fade_in,s) s = fade.out(duration=fade_out,s) fader = fun (a,b) -> add(normalize=false,[b,a]) cross(fader,s) end #дневной плейлист day = out(playlist("/var/www/metra52/data/www/onlydc.ru/music/day.txt")) #ночной night = out(playlist("/var/www/metra52/data/www/onlydc.ru/music/night.txt")) #Джинглы jingles = out(playlist("/var/www/metra52/data/www/onlydc.ru/music/jingls.txt")) myplay = switch([({ 3h-23h }, day),({ 23h-3h }, night)]) 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 #построение плейлиста с кроссфейдом #fade_out - затухание предыдущей песни в сек #fade_in - нарастание следующей песни в сек radioq = mksafe(crossfade(start_next=1.,fade_out=7.,fade_in=7.,myplay)) radio = smooth_add(normal=radioq,special=switch([({ 20m0s or 50m0s }, jingles)])) #radio = random(weights = [1, 4],[jingles, myplay]) #запускаем вещалку #output.icecast(%mp3, # host = "localhost", port = 9000, # password = "216937612", mount = "non-stop",name="OnLY DanCe Radio ~ RJ^NOED ~net", description="Club Music For LIVE", genre="Club House",url="http://onlydc.ru",radio)
#!/usr/local/bin/liquidsoap set("init.daemon",true) set("init.daemon.pidfile",false) set("log.file.path","/tmp/liquidsoap.log")