mirror of
https://github.com/Phantop/dotfiles
synced 2024-08-20 15:24:47 +00:00
23 lines
472 B
Bash
Executable file
23 lines
472 B
Bash
Executable file
#!/bin/sh
|
|
compare() {
|
|
cd out
|
|
for i in *; do
|
|
if [ `du "$i" | cut -f1` -lt `du ../"$i" | cut -f1` ]; then
|
|
echo $i
|
|
mv "$i" ../"$i"
|
|
fi
|
|
done
|
|
cd ..
|
|
}
|
|
|
|
mkdir out
|
|
|
|
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/{}
|
|
compare
|
|
|
|
fd -e flac -d1 -x flac -f8 {} -o out/{}
|
|
compare
|
|
|
|
rm -r out
|