2013-03-03 00:01:20 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-08-19 11:06:03 +02:00
|
|
|
if ! command -v mediainfo >/dev/null 2>&1; then
|
2013-03-03 00:01:20 +01:00
|
|
|
echo "mediainfo required."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
## This will check for badly encoded audio.
|
2013-10-23 20:14:09 +02:00
|
|
|
while IFS= read -r i; do
|
2013-03-03 00:01:20 +01:00
|
|
|
BUFFER="$(mediainfo "$i")"
|
2013-10-23 20:14:09 +02:00
|
|
|
[ -n "$(echo "$BUFFER" | grep "Bit rate mode *: Constant")" ] && echo "$i : CBR"
|
2013-03-03 00:01:20 +01:00
|
|
|
|
2013-10-23 20:14:09 +02:00
|
|
|
[ -n "$(echo "$BUFFER" | grep "Cover *: Yes")" ] && echo "$i : Cover"
|
2013-03-03 00:01:20 +01:00
|
|
|
|
2013-10-23 20:14:09 +02:00
|
|
|
[ -n "$(echo "$BUFFER" | grep "Track name/Position *: 0+")" ] && echo "$i : Leading zeros"
|
2013-03-03 00:01:20 +01:00
|
|
|
done <<EOF
|
|
|
|
$(find "." \( \
|
|
|
|
-iname '*.mp3' -o \
|
|
|
|
-iname '*.flac' -o \
|
|
|
|
-iname '*.wv' -o \
|
|
|
|
-iname '*.aac' -o \
|
|
|
|
-iname '*.wav' -o \
|
|
|
|
-iname '*.ape' -o \
|
|
|
|
-iname '*.mpc' \) )
|
|
|
|
EOF
|
|
|
|
|