mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-28 15:57:19 +00:00
24 lines
475 B
Plaintext
24 lines
475 B
Plaintext
|
#!/bin/bash
|
||
|
compare() {
|
||
|
for i in *
|
||
|
do
|
||
|
if [ `du "$i" | cut -f1` -lt `du ../"$i" | cut -f1` ]
|
||
|
then
|
||
|
echo $i
|
||
|
mv "$i" ../"$i"
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
mkdir out
|
||
|
ls *.flac | parallel ffmpeg-static -i {} -c:v copy -c:a flac -compression_level 12 -af aresample=resampler=soxr:precision=32:dither_method=triangular -sample_fmt s16 $@ out/{}
|
||
|
cd out
|
||
|
compare
|
||
|
cd ..
|
||
|
cp *.flac out
|
||
|
cd out
|
||
|
ls | parallel flac -f -8 -V {}
|
||
|
compare
|
||
|
cd ..
|
||
|
rm -r out
|