Skip to content

Instantly share code, notes, and snippets.

@stevekm
Created August 11, 2016 20:05
Show Gist options
  • Save stevekm/b777c2e247dc16dfbea104343c86d3ca to your computer and use it in GitHub Desktop.
Save stevekm/b777c2e247dc16dfbea104343c86d3ca to your computer and use it in GitHub Desktop.
Use FFMPEG to convert FLAC to MP3
#!/bin/bash
# on OS X, need to install ffmpeg
# so that we can convert FLAC music files
# into mp3 files
# install ffmpeg
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265
brew update && brew upgrade ffmpeg
# make sure it worked
ffmpeg
# convert all the .flac files in the current directory to v0 mp3
for file in *.flac; do ffmpeg -i "$file" -aq 0 "${file%%flac}mp3" ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment