Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- folder="/home/$USER/recordings"
- ffserver -f /etc/ffserver.conf &
- sleep 2
- mkfifo /tmp/fifo1 2>/dev/null
- mkdir -p "$folder"
- while true;do
- day=$(date '+%Y-%m-%d')
- mkdir -p "$folder"/"$day"
- ffmpeg -f alsa -i hw:0,0 http://localhost:4444/audio.ffm -f wav pipe:1 > /tmp/fifo1 &
- ffmpeg -i /tmp/fifo1 -ss 0 -t 300 -ar 44100 "$folder"/"$day"/"$(date '+%Y-%m-%d__%H_%M')".wav
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement