diff options
| -rwxr-xr-x | encode-libvlc.sh | 17 | ||||
| -rw-r--r-- | examplesite/configuration.sh | 2 | 
2 files changed, 14 insertions, 5 deletions
| diff --git a/encode-libvlc.sh b/encode-libvlc.sh index 8f8f672..361a743 100755 --- a/encode-libvlc.sh +++ b/encode-libvlc.sh @@ -29,13 +29,22 @@ URL=$1  ID=$2  DST=$3 -if [[ "$#" -eq 4 ]] ; then +if [[ "$#" -gt 3 ]] ; then      ENC=$4  else      ENC="dabplus-enc"  fi -BITRATE=80 +if [[ "$#" -gt 4 ]]; then +    shift 4 +    OPTIONS=$@ +else +   if [[ "$ENC" == "dabplus-enc" ]]; then +       OPTIONS="-b 80 -r 32000" +   else +       OPTIONS="-b 128 -s 48 -L" +   fi +fi  running=1 @@ -64,10 +73,10 @@ do      printmsg "Launching encoder"      if [[ "$ENC" == "dabplus-enc" ]] ; then -        dabplus-enc -v "$URL" -b $BITRATE -r 32000 -o "$DST" -l & +        dabplus-enc -v "$URL" $OPTIONS -o "$DST" -l &          encoderpid=$!      elif [[ "$ENC" == "toolame" ]] ; then -        toolame -V -s 48 -L -b $BITRATE "$URL" "$DST" & +        toolame $OPTIONS -V "$URL" "$DST" &          encoderpid=$!      fi      printerr "Detected crash of encoder!" diff --git a/examplesite/configuration.sh b/examplesite/configuration.sh index 6ff72eb..a065697 100644 --- a/examplesite/configuration.sh +++ b/examplesite/configuration.sh @@ -13,5 +13,5 @@ declare -A radios  radios[radio1]="./encode-libvlc.sh http://fbpc5.epfl.ch:8000/fb_192 radio1 tcp://localhost:9001"  # Attenuate radio2 by 3dB -radios[radio2]="./encode-libvlc.sh http://mp3lg.tdf-cdn.com/fip/all/fiphautdebit.mp3 radio2 tcp://localhost:9002 toolame" +radios[radio2]="./encode-libvlc.sh http://mp3lg.tdf-cdn.com/fip/all/fiphautdebit.mp3 radio2 tcp://localhost:9002 toolame -b 128 -s 48 -m j -y 2 -L" | 
