Command Line OGG Conversion with OSX

The following article will teach you how to install the Vorbis command line tools within OSX (Snow Leopard). I found myself wanting to build an HTML5 player, but quickly realized that only OGG files have broad support within the HTML5 capable browsers.

If you're also trying to convert mp3s, you'll need to install "Lame." Detailed installation instructions can be found here, although they are almost identical to the ones I give below.

Step One - Download the Packages

Head on over to xiph and grab the following files.

libogg-1.2.0.zip
libvorbis-1.3.1.zip
vorbis-tools-1.4.0.zip
libtheora-1.1.1.zip

Step Two - Unzipping & Installing

Take each of the zipped files you just downloaded and unzip them into separate directories. Once everything is unzipped, we'll need to install each library one-by-one. The long winded instructions look like this:

# Change into the libogg-1.2.0 directory
cd libogg-1.2.0

# Run the config command
./configure

# Run the 'make' command
make

# Install libogg as a super user
sudo make install


# Change into the libvorbis-1.3.1 directory
cd libvorbis-1.3.1

# Run the config command
./configure

# Run the 'make' command
make

# Install the vorbis library as a super user
sudo make install


# Change into the libtheora-1.1.1 directory
cd libtheora-1.1.1

# Run the config command
./configure

# Run the 'make' command
make

# Install libtheora as a super user
sudo make install


# Change into the vorbis-tools-1.4.0 directory
cd vorbis-tools-1.4.0

# Run the config command with a special parameter
./configure --disable-ogg123

# Run the 'make' command
make

# Install the vorbis-tools as a super user
sudo make install

Step Three - Test if it's working!

You'll need to find a humble .wav file and run the following command to ensure everything is working properly.

# Encode your wave file
oggenc your-wave-file.wav

# For documentation just type
oggenc -h

You may also want to checkout this page for some more examples of implementation.