Skip to content

Instantly share code, notes, and snippets.

@gartenfeld
Created December 19, 2014 12:29
Show Gist options
  • Save gartenfeld/ea34076d0c257ae26812 to your computer and use it in GitHub Desktop.
Save gartenfeld/ea34076d0c257ae26812 to your computer and use it in GitHub Desktop.
Convert audio using ffmpeg.
1. Download the binary ffmpeg: http://ffmpegmac.net/
2. Extract the executable ffmpeg file.
3. Copy it to a directory that is in your executable path, e.g. /usr/bin.
sudo cp ~/Downloads/ffmpeg /usr/bin/ffmpeg
4. Make it executable:
sudo chmod +x /usr/bin/ffmpeg
Now, in the folder with the AIFF files, run this:
for f in *.aiff; do ffmpeg -i "$f" "${f%.aiff}.ogg" -aq:a 2; done
Where:
-aq:a 2 <- This sets the audio output quality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment