xmlstarlet + icecast // return a value
curl –get -s -o – –user ‘admin:adminpass’ “http://localhost:8000/admin/stats” | xml sel -t -m ‘/icestats/source[@mount=”/myradio.mp3″]’ -v listeners -v channels -n –
curl –get -s -o – –user ‘admin:adminpass’ “http://localhost:8000/admin/stats” | xml sel -t -m ‘/icestats/source[@mount=”/myradio.mp3″]’ -v listeners -v channels -n –
You have had the correct file rights and this message already occurs in error.log? The icecast.xml is accepted without problems during regular start? Your icecast runs stable? Solution: Maybe you have chrooted and the icecast process now can not access to the icecast.xml you have had provided via command line.
Get the sources: https://github.com/savonet/liquidsoap/releases and untar them. Add some packages: # pkg_add ocaml # pkg_add ocaml-graphics # pkg_add fdk-aac # pkg_add faad # pkg_add libao # pkg_add libmad # pkg_add taglib # pkg_add ocaml-pcre # pkg_add ocaml-camlp4 # pkg_add libogg # pkg_add libvorbis # pkg_add flac # pkg_add lame # pkg_add gmake # pkg_add ffmpeg […]
# ffmpeg -hide_banner -loglevel panic -re -icy 1 \ -i http://217.160.15.191/bbradio-ch04.aac -vn -map_metadata:s:0 0:g \ -acodec copy -f adts icecast://source:MYPASS@localhost:8000/test # ffmpeg -hide_banner -loglevel panic -re -icy 1 \ -i http://217.160.15.191/bbradio-ch04.mp3 -vn -map_metadata:s:0 0:g \ -acodec copy -f mp3 icecast://source:MYPASS@localhost:8000/test # sudo -u _liquidsoap liquidsoap \ output.icecast(%fdkaac, icy_metadata=”true”, host=”DstHOST”, port=80, password=”MyPASS”, mount=”/bbradio.aac”, mksafe(input.http(“http://SrcHOST:80/bbradio-ch01.aac”))) # sudo […]
gawk ‘BEGIN { FPAT=”([^ ]+)|(\”[^\”]+\”)|(\\[[^\\]]+\\])” } { print $9 }’
Use output.alsa in unbuffered mode. To prevent scratching sounds on start (sound devices buffer is not empty on start) do system(“aplay -d 1 -q silence.wav”) at the beginning of your script. It replaces the buffer remnants witch silence.
linux: curl -s http://streams.ir-media-tec.com/bbradio.aac | grep 1 > /dev/null && echo OK || echo BRICKED openbsd: curl -s http://streams.ir-media-tec.com/bbradio.aac | head -1 | grep 1 > /dev/null && echo OK || echo BRICKED