any2ufmf: Convert any AVI to μFMF

any2ufmf is an open-source program to assist in converting uncompressed AVI files to the Micro Fly Movie Format. It is provided especially for use with the Ctrax tracking package.


any2ufmf is provided as an installer package for 64-bit Windows only. The current version is

You may also need to install the Visual C++ 2010 Redistributable Package from Microsoft.


The version 1.0 interface for any2ufmf is rather crude. Video conversion proceeds in four steps, which start immediately upon running the program:

  1. Select input video. Videos are read by OpenCV (currently using version 2.4.7). The list of compatible video formats is undocumented, but it's known to include most AVI files.
  2. Select output filename.
  3. Select custom compression parameters. You may use the defaults, but the output quality will be better if you customize the settings to match your movie.
  4. Video conversion occurs. The program will open a window displaying the video frames as they are compressed, and a DOS terminal window will display information about the conversion progress.
  5. When conversion is finished, the terminal window will say so. You may close the windows or press ESC to exit any2ufmf.

Conversion Parameters

UFMF compresses raw video by performing background subtraction. Conceptually, the background is assumed to be static or nearly so, and only the pixels in each frame which differ from the background are stored. This conserves space on disk and also speeds up tracking by effectively pre-processing the video.

Because the conversion to UFMF is a pre-processing step before tracking, it should be treated as equally important to the tracking itself. There are a number of parameters which can be set to affect the compression and conversion, and these should be determined through experience to result in the best tracking possible for your setup. We provide two sets of parameters to document and guide this process:

UFMF conversion, like almost all video compression techniques, is lossy, meaning information is lost that cannot be recovered. The information loss is conservative with respect to the foreground portions of the image, but you should confirm that your compressed UFMF videos are generally trackable before deleting the original uncompressed files. Once the correct settings are determined, it is safe to rely on UFMF for all tracking and archival purposes.

Reading UFMFs

The Ctrax toolboxes for Matlab (the Ctrax-matlab-*.zip archives) contain a detailed description of the UFMF format and Matlab tools to read and write UFMF files. These tools can also be found in the Ctrax source repository inside matlab/filehandling.


Support for any2ufmf is provided through the Ctrax Google Group.