mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-16 11:52:47 +00:00
Fish: optiflac (took me way too long to function)
This commit is contained in:
parent
afe4c30f1c
commit
836d4db9f7
15
.config/fish/functions/optiflac.fish
Normal file
15
.config/fish/functions/optiflac.fish
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Defined in /tmp/fish.YGBcMf/optiflac.fish @ line 2
|
||||
function optiflac
|
||||
mkdir out
|
||||
for i in *.flac
|
||||
ffmpeg -i $i -c:v copy -c:a flac -compression_level 12 -af aformat=s16:44100 out/$i
|
||||
end
|
||||
cd out
|
||||
for i in (ff -e flac)
|
||||
if test (du $i | cut -f1) -lt (du ../$i | cut -f1)
|
||||
echo $i
|
||||
mv $i ../$i
|
||||
end
|
||||
end
|
||||
cd ..
|
||||
end
|
Loading…
Reference in a new issue