Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement