Rips music to 96K opus and push onto device with rsync (with an ssh daemon running in Termux; sshd
).
#!/bin/bash
# pass IP of device as argument
MUSICDIR=/home/$USER/tmp/ANDROID/MUSIC
find "${MUSICDIR:?}" -type f \( -iname "*.flac" -o -iname '*.mp4' -o -iname "*.alac" -o -iname "*.ape" -o -iname '*.m4a' -o -iname '*.m4b' -o -iname "*.ogg" -o -iname "*.webm" -o -iname "*.wav" -o -iname '*.mp3' \) -exec sh -c 'ffmpeg -y -i "$1" -c:a libopus -b:a 96K "${1%.*}.opus"' sh {} \; && find "${MUSICDIR:?}" -depth -exec perl-rename "s/[\\:*?\"<>|\n]//g" "{}" \; && rsync -avzz --progress -e "ssh -p 8022" "${MUSICDIR:?}"/. "$1":"/sdcard/Music/"
And then play locally. (I've been using Musicolet.)