bootshorn records use temp file
This commit is contained in:
parent
60f29aab70
commit
504089427d
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ do
|
||||||
# get date in ISO 8601 format with nanoseconds
|
# get date in ISO 8601 format with nanoseconds
|
||||||
PROGRAMM=$(test $(uname) = "Darwin" && echo "gdate" || echo "date")
|
PROGRAMM=$(test $(uname) = "Darwin" && echo "gdate" || echo "date")
|
||||||
DATE=$($PROGRAMM "+%Y-%m-%d_%H-%M-%S.%6N%z")
|
DATE=$($PROGRAMM "+%Y-%m-%d_%H-%M-%S.%6N%z")
|
||||||
|
FILE="recordings/$DATE.flac"
|
||||||
|
|
||||||
# record audio using ffmpeg
|
# record audio using ffmpeg
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
@ -19,5 +20,7 @@ do
|
||||||
-t "3600" \
|
-t "3600" \
|
||||||
-c:a flac \
|
-c:a flac \
|
||||||
-compression_level 12 \
|
-compression_level 12 \
|
||||||
"recordings/$DATE.flac"
|
"$FILE.part"
|
||||||
|
|
||||||
|
mv "$FILE.part" "$FILE"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue