diff options
| author | Steph Enders <steph@senders.io> | 2025-12-03 12:01:28 -0500 |
|---|---|---|
| committer | Steph Enders <steph@senders.io> | 2025-12-03 12:01:28 -0500 |
| commit | 87e8de41e1c1f0b44da9dac2059a8d74c8922f92 (patch) | |
| tree | aaee49b7aa702c81b0d2714546e6853a708f7441 | |
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
| -rw-r--r-- | README.txt | 14 | ||||
| -rwxr-xr-x | fflacify | 1 | ||||
| -rwxr-xr-x | fflacify-dir | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..642e942 --- /dev/null +++ b/README.txt @@ -0,0 +1,14 @@ += fflacify +Easily convert media into .flac + +== fflacify-dir usage + +./fflacify-dir [DIR] [EXT] + +Converts all files in the target dir with the provided extension to .flac +== fflacify usage + +./flacify [FILE] + +Converts the target file into .flac + diff --git a/fflacify b/fflacify new file mode 100755 index 0000000..d444019 --- /dev/null +++ b/fflacify @@ -0,0 +1 @@ +ffmpeg -i "${1}" "${1%.*}.flac"
\ No newline at end of file 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 |