repo: music action: commit revision: path_from: revision_from: f73c3bb0fa82ecc4348ed3e9c80a546b369d85ae: path_to: revision_to:
commit f73c3bb0fa82ecc4348ed3e9c80a546b369d85ae Author: epochDate: Mon Dec 16 03:11:57 2019 -0600 added the radio scripts after cleaning and splitting up. tried to add icy-title support. still WIP. diff --git a/music-radio b/music-radio new file mode 100755 index 0000000000000000000000000000000000000000..77dea0ad271b708223fdb04f05b8a7cc99244f20 --- /dev/null +++ b/music-radio @@ -0,0 +1,4 @@ +#!/bin/sh +lsmod | grep snd_aloop > /dev/null || sudo modprobe snd_aloop +logger -n logserver "RADIO IS NOW ON. http://$(domainname):8901/" +exec ncat -vklp 8901 -e music-stream diff --git a/music-stream b/music-stream new file mode 100755 index 0000000000000000000000000000000000000000..e574a1c8bf7c472cbe4fd6c04481dd79d73a2547 --- /dev/null +++ b/music-stream @@ -0,0 +1,18 @@ +#!/bin/bash +#icy_metaint=1024 +#while read -t 2 LINE;do +# printf "%s\n" "$LINE" +#done \ +# | if grep -i "Icy-Metadata:" | cut -d: -f2- | grep 1 >/dev/null;then +# printf "HTTP/1.1 200 OK\r\n" +# printf "icy-metaint: %s\r\n" "${icy_metaint}" +# printf "Content-Type: audio/ogg\r\n\r\n" +# stdbuf -o0 pacat --record -d alsa_output.pci-0000_00_07.0.analog-stereo.monitor --format=s16le \ +# | stdbuf -o0 oggenc - -r -C 2 -R 44100 -q 2 \ +# | icy-metadata "${icy_metaint}" +#else + printf "HTTP/1.1 200 OK\r\n" + printf "Content-Type: audio/ogg\r\n\r\n" + stdbuf -o0 pacat --record -d alsa_output.pci-0000_00_07.0.analog-stereo.monitor --format=s16le \ + | stdbuf -o0 oggenc - -r -C 2 -R 44100 -q 2 +#fi
-----END OF PAGE-----