summaryrefslogtreecommitdiff
path: root/bin/m4a2mp3
blob: bc2584a7247acf889c46137a60159197b3676037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# This script should be launched from the root dir of music library.

find . -name "*.m4a" | while read -r in; do
	out="../mp3/${in%.m4a}.mp3"
	dir="${out%/*}"
	test -d "$dir" && continue
	echo "$dir"
	mkdir -p "$dir"
done

find . -name "*.m4a" -exec ffmpeg -i {} -c:v copy -q:a 0 ../mp3/{}.mp3 \;

exit