metalx1000

CAD Radio Dispatch ENFD Stream traffic and log

Jan 28th, 2016
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. #Collier County emergency rescue/fire radio traffic
  2. #links
  3. #http://www.broadcastify.com/listen/ctid/326
  4. #http://www.broadcastify.com/listen/ctid/326/web
  5.  
  6. #Stream
  7. mplayer "http://audio7.broadcastify.com/bnyk05613vtg.mp3?nocache=7794470"
  8.  
  9. #dump stream
  10. #streamripper "http://audio7.broadcastify.com/bnyk05613vtg.mp3?nocache=7794470"
  11. wget "http://audio7.broadcastify.com/bnyk05613vtg.mp3?nocache=7794470" -O dispatch.mp3
  12.  
  13. #split stream
  14. apt-get install libsox-fmt-mp3 sox
  15. wget -q "http://audio7.broadcastify.com/bnyk05613vtg.mp3?nocache=7794470" -O- |sox -t mp3 -V3 - output.mp3 silence 1 3.0 0.1% 1 0.3 0.1% : newfile : restart
  16.  
  17. #rename files with timestamp
  18. #!/bin/bash
  19.  
  20. mkdir logged
  21.  
  22. while [ 1 ]
  23. do
  24.   echo "Moving files to logged..."
  25.   for i in *.wav
  26.   do
  27.     date="$(ls -l $i |awk '{print $6 " " $7 " " $8}')"
  28.     epoch="$(date --date="$date" +%s)"
  29.     mv -v $i logged/$epoch.wav
  30.   done
  31.   sleep 1m
  32. done
Add Comment
Please, Sign In to add comment