2020-10-13 20:14:57 +00:00
|
|
|
#!/bin/sh
|
2020-08-04 03:17:43 +00:00
|
|
|
compare() {
|
2021-01-24 05:49:08 +00:00
|
|
|
cd out
|
|
|
|
for i in *; do
|
|
|
|
if [ `du "$i" | cut -f1` -lt `du ../"$i" | cut -f1` ]; then
|
2020-08-04 03:17:43 +00:00
|
|
|
echo $i
|
|
|
|
mv "$i" ../"$i"
|
|
|
|
fi
|
|
|
|
done
|
2021-01-24 05:49:08 +00:00
|
|
|
cd ..
|
2020-08-04 03:17:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mkdir out
|
2021-01-24 05:49:08 +00:00
|
|
|
|
|
|
|
args="-af aresample=resampler=soxr:precision=32:dither_method=triangular -sample_fmt s16"
|
|
|
|
fd -e flac -d1 -x ffmpeg -hide_banner -i {} -c:v copy -c:a flac -compression_level 12 $args $@ out/{}
|
2020-08-04 03:17:43 +00:00
|
|
|
compare
|
2021-01-24 05:49:08 +00:00
|
|
|
|
|
|
|
fd -e flac -d1 -x flac -f8 {} -o out/{}
|
2020-08-04 03:17:43 +00:00
|
|
|
compare
|
2021-01-24 05:49:08 +00:00
|
|
|
|
2020-08-04 03:17:43 +00:00
|
|
|
rm -r out
|