SHARE
TWEET

Untitled

a guest Feb 5th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. folder="/home/$USER/recordings"
  3. ffserver -f /etc/ffserver.conf &
  4. sleep 2
  5.  
  6. mkfifo /tmp/fifo1 2>/dev/null
  7. mkdir -p "$folder"
  8.  
  9. while true;do
  10.     day=$(date '+%Y-%m-%d')
  11.     mkdir -p "$folder"/"$day"
  12.     ffmpeg -f alsa -i hw:0,0 http://localhost:4444/audio.ffm -f wav pipe:1 > /tmp/fifo1 &
  13.     ffmpeg -i /tmp/fifo1 -ss 0 -t 300 -ar 44100 "$folder"/"$day"/"$(date '+%Y-%m-%d__%H_%M')".wav
  14. done
  15.  
  16. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top