For a single file:
ffmpeg -i -acodec libmp3lame -ar 22050
For a bunch of M4B files:
for m4b in $(ls -1 *.m4b); do ffmpeg -i $m4b -acodec libmp3lame -ar 22050 ${m4b}.mp3; done
Just another page out of my life
For a single file:
ffmpeg -i -acodec libmp3lame -ar 22050
For a bunch of M4B files:
for m4b in $(ls -1 *.m4b); do ffmpeg -i $m4b -acodec libmp3lame -ar 22050 ${m4b}.mp3; done
Removing spaces from filelemanes can be archived using various methods. The command below uses sed to do this, before running it make sure you are in the folder containing the files whose names you want to change.
for file in *; do mv "$file" `echo $file | sed -e 's/ */_/g' -e 's/_-_/-/g'`; done