MP3
$ sudo apt-get install faad lame $ faad --stdio INPUT.m4b | lame --preset standard - OUTPUT.mp3
OGG
$ sudo apt-get install faad vorbis-tools $ faad --stdio INPUT.m4b | oggenc -Q -q6 - -o OUTPUT.ogg
Thanks to https://www.linuxquestions.org/questions/linux-software-2/convert-m4b-to-mp3-batch-682854/ and http://robert.penz.name/94/convert-m4b-to-ogg-on-linux/