Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -x
- folder="/home/$USER/recordings"
- ffserver -f /etc/ffserver.conf &
- sleep 3
- mkfifo fifo1 2>/dev/null
- while true;do
- mkdir -p "$folder"
- 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 > fifo1 &
- ffmpeg -i fifo1 -ss 0 -t 300 -ar 44100 "$folder"/"$day"/"$(date '+%Y-%m-%d__%H_%M_%S')".wav
- done
- exit 0
- # -filter_complex "[0:a]showfreqs=mode=line:fscale=log,format=yuv420p[v]" -map "[v]" -map 0:a http://localhost:4444/video.ffm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement