Converting TWiT Video/Setting Up On Mac OS X

From The Official TWiT Wiki
Jump to: navigation, search

This page describes the process of setting up the conversion process on Mac OS X using free and open source software. The two pieces of software we'll need for this process are ffmpeg (0.5 or later) and MP4Box.

Prerequisites

  1. Mac OS X Leopard running on an Intel Mac.
  2. Apple's Xcode Developer Tools (the latest version is recommended and can be found here).
  3. An open terminal. From the finder, go to applications, utilities, and open up terminal.

Installing Mac Ports

Mac Ports is a package manager for OSX which can be used to install and upgrade a set software packages which are needed for this process.

  1. Download the Leopard (Universal) pkg of mac ports from here and install it.
  2. In the terminal, now update macports to the latest version.
    $ port -v selfupdate

Installing GNU Wget

Info.png This step is optional. OS X already comes with a command line utility called 'cURL' which accomplishes the same task as Wget. If you want to use cURL to capture the stream instead of Wget then skip this section. For information on how to use cURL to capture the stream read this guide.


GNU Wget is a command line program which can capture the http stream TWiT Live uses to broadcast its live video. To install Wget issue the following command to the terminal (you will be prompted for your root password):

$ sudo port install wget

Installing FFMPEG

FFMPEG is a command line program and the workhorse of the conversion process. It's what takes the flv and repackages it as an mp4. To install ffmpeg issue the following command to the terminal (you will be prompted for your root password):

$ sudo port install ffmpeg

Installing MP4Box

MP4Box is a command line program which allows for manipulation of mp4 files.

  1. Download the GPAC source code from here and the GPAC third-party libraries from here.
  2. Extract both of the files you just downloaded in the terminal
    • $ tar xzf gpac-0.4.5.tar.gz
    • $ tar xzf gpac_extra_libs-0.4.5.tar.gz
  3. Move the gpac_extra_libs/ directory into the gpac/ directory so they will be compiled together.
    • $ cd gpac_extra_libs
    • $ cp -r * ../gpac/extra_lib
    • $ cd ../gpac/
  4. Enter the gpac/ directory.
    • $ cd gpac/
  5. Build the GPAC library and MP4Box. Depending on your system this may take several minutes.
    • $ chmod +x configure
    • $ ./configure
    • $ make lib
    • $ make apps
  6. Install MP4Box and the GPAC library (this will ask for your root password).
    • $ sudo make install