Guest User

Untitled

a guest
Jan 29th, 2019
142
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. set -x
  3. folder="/home/$USER/recordings"
  4. ffserver -f /etc/ffserver.conf &
  5. sleep 3
  6.  
  7. mkfifo fifo1 2>/dev/null
  8.  
  9.  
  10. while true;do
  11. mkdir -p "$folder"
  12. day=$(date '+%Y-%m-%d')
  13. mkdir -p "$folder"/"$day"
  14. ffmpeg -f alsa -i hw:0,0 http://localhost:4444/audio.ffm -f wav pipe:1 > fifo1 &
  15. ffmpeg -i fifo1 -ss 0 -t 300 -ar 44100 "$folder"/"$day"/"$(date '+%Y-%m-%d__%H_%M_%S')".wav
  16. done
  17.  
  18. exit 0
  19.  
  20.  
  21.  
  22. # -filter_complex "[0:a]showfreqs=mode=line:fscale=log,format=yuv420p[v]" -map "[v]" -map 0:a http://localhost:4444/video.ffm
RAW Paste Data