From 85d095ac1c798292bbed74a7a13067c1e8302138 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Wed, 3 Dec 2025 12:13:34 -0500 Subject: Add utility for converting dir to 320kbps mp3s Basically a copy of fflacify-dir but for mp3s --- 320kme-pls | 10 ++++++++++ README.txt | 17 ++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 320kme-pls 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 -- cgit v1.2.3-54-g00ecf