blob: 96e2cde0ad5d12ce2b2a896db7681fc892a97de8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
# This script should be launched from the root dir of music library.
# Use highest quality VBR, preserve metadata:
# ffmpeg -i "$1" -q:a 0 "${1%.flac}.mp3"
# get all mp3 already here and copy to dest
# find . -name "*.mp3"
# Convert all flacs into mp3s
find . -name "*.flac" | while read -r in; do
out="../mp3/${in%.flac}.mp3"
dir="${out%/*}"
test -d "$dir" && continue
echo "$dir"
mkdir -p "$dir"
done
find . -name "*.flac" -exec ffmpeg -i {} -c:v copy -q:a 0 ../mp3/{}.mp3 \;
exit
|