1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-25 14:46:42 +00:00
dotfiles/bin/hitolo

25 lines
592 B
Plaintext
Raw Normal View History

#!/bin/sh
HIFI=~/Music/HiFi
LOFI=/tmp/foo
2021-01-10 03:46:08 +00:00
test -f /usr/share/man/man3/Parallel::ForkManager.3 || sudo eopkg it perl-parallel-forkmanager
if test $# -eq 0; then
mkdir "$LOFI"
fusermount -u "$LOFI"
ifuse --documents com.foobar2000.mobile "$LOFI"
else
LOFI=$1
fi
2021-03-27 22:37:14 +00:00
if ! test -d "$LOFI"; then
cd "$HIFI" || exit 1
fd -t d -x mkdir -p "$LOFI"/{}
fd -e flac -x opusenc --bitrate 256 {} "$LOFI"/'{.}'.opus
fi
# https://github.com/smxi/acxi/raw/stable/acxi
acxi -s "$HIFI" -d "$LOFI" -o opus -q 256 --clean sync -F 16 -c mp3,m4a,opus
2021-03-27 22:37:14 +00:00
fusermount -u "$LOFI"
rmdir "$LOFI"