mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-30 18:43:17 +00:00
Fish: better optiflac and split to flacr
This commit is contained in:
parent
89bba361f0
commit
971e08c2a7
24
.config/fish/functions/flacr.fish
Normal file
24
.config/fish/functions/flacr.fish
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Defined in /tmp/fish.3hjAN7/flacr.fish @ line 2
|
||||||
|
function flacr
|
||||||
|
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 $argv out/{}
|
||||||
|
cd out
|
||||||
|
for i in *
|
||||||
|
if test (du $i | cut -f1) -lt (du ../$i | cut -f1)
|
||||||
|
echo $i
|
||||||
|
mv $i ../$i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cd ..
|
||||||
|
cp *.flac out
|
||||||
|
cd out
|
||||||
|
ls | parallel flacc {}
|
||||||
|
for i in *
|
||||||
|
if test (du $i | cut -f1) -lt (du ../$i | cut -f1)
|
||||||
|
echo $i
|
||||||
|
mv $i ../$i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cd ..
|
||||||
|
rm -r out
|
||||||
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
# Defined in /tmp/fish.Yy0Eg4/optiflac.fish @ line 2
|
# Defined in /tmp/fish.B19DWM/optiflac.fish @ line 2
|
||||||
function optiflac
|
function optiflac
|
||||||
mkdir out
|
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 $argv out/{}
|
ls *.flac | parallel ffmpeg -i {} -c:v copy -c:a flac -compression_level 12 $argv out/{}
|
||||||
cd out
|
cd out
|
||||||
for i in *
|
for i in *
|
||||||
if test (du $i | cut -f1) -lt (du ../$i | cut -f1)
|
if test (du $i | cut -f1) -lt (du ../$i | cut -f1)
|
||||||
|
@ -20,4 +20,5 @@ function optiflac
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cd ..
|
cd ..
|
||||||
|
rm -r out
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue