diff options
| -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 |