Converting TWiT Video/Setting Up On Windows

From The Official TWiT Wiki
Jump to: navigation, search

This page describes the process of setting up the software required for the capture and conversion process on Windows XP/Vista using free and open source software. The pieces of software we'll need for this are:

  • wget, used to capture the FLV stream from BitGravity
  • cURL, an alternate tool for FLV capture
  • ffmpeg (0.5 or later), used to process the resulting FLV file to an MP4
  • MP4Box, used to manipulate MP4 files

Contents

Prerequisites

  • Windows XP, Windows Vista, or Windows 7
  • Administrative Privileges
  • Knowledge of creating directories, using the command prompt, changing environment variables, etc.

Creating an Installation Directory

Most of these programs do not have formal Windows-style installation procedures, do not create shortcuts on your desktop or in your start menu (unless you create these manually), etc. You simply copy them onto your machine and run them by name. Shortcuts are less than useful anyway because most of these are command-line programs; you have to run them from a command line in order to specify the parameters and options.

For easiest use and minimal effect on Windows, it is best to create a directory (folder) for all such "informal" programs. For example, if your operating system resides on your C: drive as is typical, you could create a directory such as C:\MiscPrograms\. You will place all of the programs described here, and their necessary support files, in this directory. Note that this is not C:\Program Files\ as that name is already used by Windows. Nor should you install these programs in C:\Program Files\ or any other directory "owned" by Windows.

  • You can use subdirectories. For example, you might want to organize all your ODTV-related miscellaneous programs in C:\MiscPrograms\ODTV
  • Do not include any spaces in any of the directory names. You can if you really want to, but things are just easier if you don't. The command line environment in Windows is not friendly to spaces in directory or file names.
  • You can use this same directory for other "non-installed" programs that do not create their own shortcuts, like the "Sysinternals tools".

This directory will be referred to as your "miscprog directory" in later instructions.

Adding the miscprog Directory to Your Default Path

To make these programs easily available at the command prompt or other context it is best to add your miscprog directory to your path. path is a special environment variable that Windows uses to find programs you want to run. It contains a list of directories. Whenever you type the name of a program at a command prompt or at a Run prompt, Windows checks each directory in the path variable, looking for the program. By adding your miscprog directory to the path, you don't need to type the full location of the program (such as C:\MiscPrograms\curl) every time you want to run it. You can just type curl.

  • The path search does not traverse into subdirectories of directories named in the path. For example, if you create a directory C:\MiscPrograms and a subdirectory C:\MiscPrograms\videotools, and you put only C:\MiscPrograms in your path, the path search won't look in C:\MiscPrograms\videotools. The path has to explicitly name every directory in which you want the path search to look.

You change the path variable via the "System" applet in "Control panel".

  1. Open the "System properties" dialog box as follows:
    1. Windows 2000: Click Start, Settings, Control Panel. Double click "System".
    2. Windows XP: Click Start, Control Panel.
      1. If you have the standard ("by category") Windows XP Control Panel, click the "Performance and Maintenance" category, then "System".
      2. If you have the "Classic mode" Windows XP Control Panel, double-click "System".
    3. Windows Server 2003: Click Start, Control Panel. Double click "System".
    4. Windows Vista: Click the Windows button, then Control Panel. Click "System and maintenance", then "System", then "Advanced System Settings".
  2. In the "System Properties" dialog, click the "Advanced" tab, then click the "environment variables" button.
  3. Notice that there are two groups of "variables", one group (at the top of the dialog) being specific to your current user name and the other being system wide. The latter applies to all users and to all Windows background tasks as well. In the first set, the ones specific to you, look for a variable called path.
    1. If there is not already a variable called path the job is very easy:
      1. Click the "New..." button in the upper, per-user area of the dialog.
      2. In the resulting dialog, in the "Variable name" area, type
        path
      3. In the "Variable value" area, type the exact drive letter and directory name of your miscprog directory you created earlier, such as
        C:\MiscPrograms
    2. If there is already a variable called path in the upper (per-user) area, the job is just slightly more tricky.
      1. Single-click on the name "path" in the upper, per-user part of the dialog box and then click the "Edit..." button.
      2. Inspect the "Variable value" text carefully. You will see that it contains one or more drive letter and directory name combinations. If there is more than one, they will be separated by semicolons (;) with no intervening spaces.
      3. Click once in the "Variable value" text area, creating a text cursor there.
      4. Press the "End" key on your keyboard to position the text cursor at the exact end of the existing text. Then, type a semicolon (;), followed by the drive letter and name of your miscprog directory. For example, suppose the old value was:
        %CommonProgramFiles%\Microsoft Shared\Windows Live
        then assuming your miscprog directory is C:\MiscPrograms, you want it to look like this:
        %CommonProgramFiles%\Microsoft Shared\Windows Live;C:\MiscPrograms
        Do not remove or alter any of the existing text or you may break other programs you have installed.
  4. When the "Variable value" looks correct, click "OK" out of all open dialogs. Your new path will be in effect for any new command prompt Windows you create after that point. To test it, open a command prompt (either Start | Programs | Accessories | Command prompt, or bring up a Run prompt and type cmd). Then simply type path at the command prompt. The resulting displayed path should include your new setting at the end. Notice that the "path" string you see there begins with the text from the system-wide path variable, followed by the text from the per-user path variable you edited above. This is the correct result.

Installing GNU Wget

GNU Wget is a command line program which can capture the http stream TWiT Live uses to broadcast its live video. If you already have cURL installed you should not need to install Wget.

  1. Download wget for Windows from here and run the resulting installer program.
  2. wget will install itself into C:\Program Files (x86)\GnuWin32\bin\ on 64-bit Windows, or C:\Program Files\GnuWin32\bin\ on 32-bit Windows (assuming your Windows installation is on your C: drive).
  3. Copy wget.exe, libiconv2.dll, libintl3.dll, libssl32.dll, and libeay32.dll from the above path to your miscprog directory.

Rather than copying these files, you could instead add the wget installation directory (as described in step 2) to your path.

Installing cURL

cURL is similar to Wget. It is also capable of capturing the http stream TWiT Live uses to broadcast its live video. If you already have Wget installed you should not need to install cURL.

  1. Download cURL from here and unzip the archive.
  2. Copy curl.exe from the archive to your miscprog directory.

Installing ffmpeg

ffmpeg is a command line program and the workhorse of the conversion process. It takes the FLV and repackages it as an mp4. It is also used to convert the resulting mp4 to a smaller format using a different codec. It can even be used as a capture tool.

  1. ffmpeg comes as a 7zip archive, so you will first need to install 7zip from here.
  2. Download ffmpeg 0.5 for Windows from here and open the archive with 7zip.
  3. Copy ffmpeg.exe to your miscprog directory.

Installing MP4Box

MP4Box is a command line program that allows you to manipulate mp4 files.

  1. Download MP4Box from here.
  2. Open MP4Box-0.4.5.zip and copy js32.dll and MP4Box.exe to your miscprog directory.

Troubleshooting DLL Not Found errors

If you receive "DLL Not Found" errors while trying to run either Wget or MP4Box you have probably misconfigured your path.

Personal tools