got an insanely simple and working script already:
#!/bin/bash -x
mkdir .before
mkdir .error
for i in .m??; do
ffmpeg -n -i "$i" -b:a 16k "${i%.}.opus" && mv "$i" .before/
mv "$i" .error/
done
echo zzz finished $TITLE | termux-notification
termux-vibrate -f
of course the important command is just ffmpeg there, but just keep in mind my context, please. termux. android only. simplicity... and immensely reducing my music collection size!
everything works fine with this...
except for my minor issue of the week:
the album art is lost!
there are many questions in sen dealing with this, and different reasons why (apparently all related to how ogg and opus containers work) it's actually way more complicated than it may appear at first sight.
the only proclaimed solution i could find so far is a script from 2014 which doesn't handle opus:
https://superuser.com/a/706808/28411
can you help me keeping this simple?
or else, i will just output it to a image file of same name and deal with it another year.
edit: How can I copy coverart from flac to opus with ffmpeg doesn't really answer the question. it solves the album, but i can't find a configuration with opusenc which keeps the file at 10%. setting the same bitrate (16k) gets it to 20% at best.