summaryrefslogtreecommitdiff
path: root/fflacify-dir
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2025-12-03 12:01:28 -0500
committerSteph Enders <steph@senders.io>2025-12-03 12:01:28 -0500
commit87e8de41e1c1f0b44da9dac2059a8d74c8922f92 (patch)
treeaaee49b7aa702c81b0d2714546e6853a708f7441 /fflacify-dir
Create fflacify scripts for file and directory conversions
Primary usage is: ./fflacify-dir /path/to/dir/ wav Converting all wav files in /path/to/dir/ into flac File will be generated along side the source file
Diffstat (limited to 'fflacify-dir')
-rwxr-xr-xfflacify-dir10
1 files changed, 10 insertions, 0 deletions
diff --git a/fflacify-dir b/fflacify-dir
new file mode 100755
index 0000000..2875098
--- /dev/null
+++ b/fflacify-dir
@@ -0,0 +1,10 @@
+set -e
+dir="$1"
+ext="$2"
+
+find "${dir}" -type f | while read file; do
+ if [[ $file =~ .${ext} ]]; then
+ output="${file%.${ext}}.flac"
+ ffmpeg -n -i "${file}" "${output}"
+ fi
+done