Skip to content

Instantly share code, notes, and snippets.

@theodric
Last active March 28, 2021 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save theodric/5878e6874d5d4bdbdfbffdf3e4fdb71d to your computer and use it in GitHub Desktop.
Save theodric/5878e6874d5d4bdbdfbffdf3e4fdb71d to your computer and use it in GitHub Desktop.
batch convert files from (e.g.) m4b to mp3 with ffmpeg and avconv
Single:
avconv -acodec libmp3lame -i test.m4b test.mp3
Batch:
for f in *m4b; do avconv -i "$f" -acodec libmp3lame ${f%.m4b}.mp3"; done
Single:
ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 7 output.mp3
Batch:
for f in *m4b; do ffmpeg -i "$f" -codec:a libmp3lame -qscale:a 7 "${f%.m4b}.mp3"; done
strip id3 tags:
apt install libid3-tools eyed3
~# id3convert -s a.mp3
~# eyeD3 --remove-v1 a.mp3
~# eyeD3 --remove-lyrics a.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment