summaryrefslogtreecommitdiff
path: root/fflacify-dir
blob: 2875098cf06860a4965c9b16c844143ac9725c98 (plain)
1
2
3
4
5
6
7
8
9
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