Last active
February 2, 2024 10:22
-
-
Save sistematico/8c8480c5c5ba7c8a154ed353d0700e89 to your computer and use it in GitHub Desktop.
ShoutCast Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Downloads 64 bits: | |
sc_serv: https://dl.dropbox.com/s/awj65gxyighz4ro/sc_serv2_linux_x64-latest.tar.gz?dl=1 | |
sc_trans: https://dl.dropbox.com/s/ol88p5cwy9ivhvx/sc_trans_linux_x64_10_07_2011.tar.gz?dl=1 | |
Downloads 32 bits: | |
sc_serv: [FALTANDO] | |
sc_trans: https://dl.dropbox.com/s/zfmfh0ahdv7mjx0/sc_trans_linux_10_07_2011.tar.gz?dl=1 | |
Para baixar o último sc_serv vá até: https://www.shoutcast.com/BroadcastNow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Lembrando que para streams AAC não é preciso uma licença. | |
- O script shoutcast foi desenhado para o Debian, em breve haverá uma versão para o Arch Linux. | |
Para instalar salve em /etc/init.d/ | |
Dê permissões de execução: chmod 755 /etc/init.d/shoutcast | |
Habilite a inicialização do script após o boot do sistema: update-rc.d shoutcast defaults | |
- Lembre-se de alterar todas as instancias de /home/radio para a pasta do seu | |
usuário(que terá permissões de acesso as músicas em /usr/local/musicas ou outra pasta que desejar). | |
- Os arquivos sc_serv.conf e sc_trans_basic.conf vão em /home/radio/shoutcast/ e /home/radio/transcoder/ respectivamente. | |
- Dúvidas ou sugestões? Comente abaixo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adminpassword=SENHA_ADMIN | |
maxuser=1000 | |
password=SENHA_STREAM | |
requirestreamconfigs=1 | |
streamadminpassword_1=SENHA_ADMIN_STREAM_1 | |
publicserver=always | |
streamauthhash_1=AUTH_HASH | |
streammaxuser_1=512 | |
streampassword_1=SENHA_STREAM_1 | |
streampath_1=/stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logfile=logs/sc_trans.log | |
calendarrewrite=0 | |
encoder_1=mp3 | |
bitrate_1=128000 | |
outprotocol_1=3 | |
serverip_1=IP | |
serverport_1=8000 | |
; this is the same as 'password' in sc_serv_basic.conf | |
; Não é a senha da streampassword_1 !!!! | |
password_1=SENHA_STREAM | |
streamid_1=1 | |
endpointname_1=/stream | |
streamtitle=Nome da Radio | |
streamurl=http://www.urldaradio.com | |
genre=Rock | |
playlistfile=lista.lst | |
adminport=7999 | |
adminuser=admin | |
adminpassword=SENHA_ADMIN | |
;serverintrofile=<specify_intro_filepath> | |
;serverbackupfile=<specify_backup_filepath> | |
unlockkeyname=Nome da Licença | |
unlockkeycode=LICENÇA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# sct_refresh.sh: Create and Refresh a SC Trans playlist | |
# | |
# Developed by Lucas Saliés Brum a.k.a. sistematico, <[email protected]> | |
# Based on "Dytut" work: | |
# http://forums.winamp.com/showpost.php?p=1806538&postcount=6 | |
# | |
# Suggested cronjob: */60 * * * * /bin/sh /home/shoutcast/bin/sct_refresh.sh | |
# | |
# Vars | |
TRANS_HOME="/home/radio" | |
TRANS_PID=$(pidof sc_trans) | |
TRANS_FIND=$(which find) | |
TRANS_KILL=$(which kill) | |
TRANS_CHOWN=$(which chown) | |
TRANS_PATH="${TRANS_HOME}/musicas" | |
TRANS_LIST="${TRANS_HOME}/lista.lst" | |
TRANS_USER="radio" | |
TRANS_GROUP="radio" | |
# DONT CHANGE BELOW | |
# Create playlist | |
$TRANS_FIND $TRANS_PATH -iname "*.mp3" > $TRANS_LIST | |
# Reload new playlist(try one of above, maybe need root permissions) | |
#$TRANS_KILL -s USR1 $TRANS_PID | |
#$TRANS_KILL -USR1 $TRANS_PID | |
sudo $TRANS_KILL -SIGUSR1 $TRANS_PID | |
# turn shuffle on/off | |
# $TRANS_KILL -s USR2 $TRANS_PID | |
# Change permissions | |
# $TRANS_CHOWN ${TRANS_USER}:${TRANS_GROUP} $TRANS_LIST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: sc_serv | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: startscript sc_serv | |
# Description: startscript for sc_serv (DNASv2) | |
### END INIT INFO | |
# Autor: Lucas Saliés Brum <lucas AT archlinux DOT com DOT br> | |
# Shoutcast Vars | |
HOME="/home/radio" | |
SHOUT_HOME="/home/radio/shoutcast" | |
SHOUT_PID=$(pidof sc_serv) | |
USER="radio" | |
DESC="Shoutcast Stream" | |
NAME="shoutcast" | |
SCRIPTNAME="/etc/init.d/$NAME" | |
# sc_trans Vars | |
TRANS_HOME="/home/radio/transcoder" | |
TRANS_PID=$(pidof sc_trans) | |
TRANS_FIND=$(which find) | |
TRANS_CHOWN=$(which chown) | |
TRANS_PATH="/usr/local/musicas" # Lembre-se de dar um chown -R radio:radio | |
TRANS_LIST="${TRANS_HOME}/lista.lst" | |
do_start() | |
{ | |
su $USER -c "cd $SHOUT_HOME; ./sc_serv daemon ./sc_serv.conf" | |
su $USER -c "cd $TRANS_HOME; ./sc_trans ./sc_trans_basic.conf 2> /dev/null 1> /dev/null &" | |
} | |
do_stop() | |
{ | |
#cd $SHOUT_HOME; kill -9 `cat sc_serv_8000.pid` | |
pkill -9 sc_serv | |
pkill -9 sc_trans | |
} | |
do_refresh() | |
{ | |
su $USER -c "$TRANS_FIND $TRANS_PATH -iname "*.mp3" > $TRANS_LIST" | |
pkill -SIGUSR1 sc_trans | |
} | |
case "$1" in | |
start) | |
echo "Starting $DESC $NAME" | |
do_start | |
;; | |
stop) | |
echo "Stopping $DESC $NAME" | |
do_stop | |
;; | |
refresh) | |
echo "Refreshing $DESC $NAME" | |
do_refresh | |
;; | |
restart) | |
echo "Stopping $DESC $NAME" | |
do_stop | |
echo "Starting $DESC $NAME" | |
do_start | |
;; | |
*) | |
echo "Uso: $SCRIPTNAME {start|stop|refresh|restart}" | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment