You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
499 B
Bash
22 lines
499 B
Bash
#!/usr/bin/env zsh
|
|
# requires: ffmpeg
|
|
# written by Steve Kinney (2018), licensed under CC BY-SA 4.0
|
|
# audio -> 16/48K
|
|
|
|
IMG_FILES="^*.png ^*.PNG ^*.jpg ^*.JPG ^*.bmp ^*.BMP ^*.gif ^*.GIF ^*.tiff ^*.TIFF"
|
|
|
|
for f in *.flac;
|
|
do
|
|
echo "Processing $f"
|
|
ffmpeg -y -i "$f" -sample_fmt s16 -ar 48000 "${f%.flac}-16.flac"
|
|
done
|
|
|
|
while true; do
|
|
read -p "Delete original files? " yn
|
|
case $yn in
|
|
[Yy]* ) rm -- ^*-16.flac $IMG_FILES; exit;;
|
|
[Nn]* ) exit;;
|
|
* ) printf "Please answer yes or no. ";;
|
|
esac
|
|
done
|