From 259da30d45794bfd2017b46c5949637251f84a35 Mon Sep 17 00:00:00 2001 From: Leo Coogan Date: Tue, 15 Feb 2022 23:50:32 -0500 Subject: [PATCH] New script --- bin/fflow | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/fflow diff --git a/bin/fflow b/bin/fflow new file mode 100755 index 0000000..2519fd9 --- /dev/null +++ b/bin/fflow @@ -0,0 +1,21 @@ +#!/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