summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2025-12-03 12:13:34 -0500
committerSteph Enders <steph@senders.io>2025-12-03 12:16:34 -0500
commit85d095ac1c798292bbed74a7a13067c1e8302138 (patch)
treeb37830b46162fff27d266696b4dd166142d4ebf5
parent87e8de41e1c1f0b44da9dac2059a8d74c8922f92 (diff)
Add utility for converting dir to 320kbps mp3smain
Basically a copy of fflacify-dir but for mp3s
-rwxr-xr-x320kme-pls10
-rw-r--r--README.txt17
2 files changed, 26 insertions, 1 deletions
diff --git a/320kme-pls b/320kme-pls
new file mode 100755
index 0000000..d0450df
--- /dev/null
+++ b/320kme-pls
@@ -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}}.mp3"
+ ffmpeg -n -i "${file}" -b:a 320k "${output}"
+ fi
+done
diff --git a/README.txt b/README.txt
index 642e942..afa5c00 100644
--- a/README.txt
+++ b/README.txt
@@ -5,10 +5,25 @@ Easily convert media into .flac
./fflacify-dir [DIR] [EXT]
-Converts all files in the target dir with the provided extension to .flac
+Converts all files in the target dir with the provided extension to .flac
+Outputs are located along side source file
+
== fflacify usage
./flacify [FILE]
Converts the target file into .flac
+Outputs the file along side source
+
+== 320kme-pls usage
+
+./320kme-pls [DIR] [EXT]
+
+Converts all the files in the target dir with the provided extension to a 320kbps .mp3
+Essentialy fflacify-dir but for 320k mp3s.
+
+== General Notes
+Script will terminate if hits a failure
+Script can be re-run multiple times over the same directory; passes -n into ffmpeg to skip existing target files.
+Worst case scenario run ./fflacify on the specific file failing - or just idk... do it yourself