Frame Subtractor

Frame Subtractor is an application that removes background information from video images.

(Frame Subtractor displaying the “difference” image. Stationary objects disappear.)

It compares each frame of the video to the previous frame, and only passes the pixels that have changed. So it highlights moving objects and makes stationary things disappear. Alternatively, it can average together many frames to make a “history image” which is used for the subtraction. In this case, the whole moving object becomes visible (not just the edges), and things won’t disappear when they stop temporarily. It can (optionally) remove redundant frames from your movie, shortening it. Processing can happen in color or b/w and the output can be recorded back to a Quicktime movie.

(“history” image: moving objects disappear.)

(choose FPS and compression format)

These techniques (sometimes called “background subtraction”, “frame differencing”, or “frame subtraction”) are standard pre-processing stages for machine vision algorithms like motion-tracking, but they can be beautiful in their own right. I built this software for an artist, Laura Napier, who was investigating the formations of pedestrians on NYC sidewalks in 2007 but perhaps others might find it useful too.

The source code is included under a GPL license. It was developed in the MAX/MSP/Jitter visual programming environment ( ) which will be required if you want to edit the source code. ($$$)

Download Current Version

v 02 (Mac Intel/PPC)

2011, 11MB with source “patches” for MAX/MSP/Jitter 5.
You may need to adjust your security settings and/or install Java. See Installation Instructions.

There is no Windows version (details).

Changes in this version:

  • Changed to GPL 3.0 license
  • Recompiled with MAX 5
  • Added support for arbitrary frame sizes
    (Previously it was locked to NTSC. Now the output movie will match the dimensions of your input movie.)
  • Added non-realtime rendering to make it easier to render a movie without dropped frames
  • Added option to avoid redundant-frame deletion.
    (Previously it was always on, so still moments in your source movie would always be truncated.)

Known bugs in this version:

  • The video window is always 4:3 aspect ratio, so widescreen movies will look stretched. Don’t worry, the internal processing and output movie are not stretched.
  • There is no way to pause or stop the rendering process. Once you start rendering, you will have to wait until it’s done.
  • There is no indicator to tell you that a realtime recording is in progress.
    (You must remember to press “stop” when you’re finished.)
  • If you want to remove redundant frames, they must be digitally identical to each other. A screencast with periods of inactivity will be shortened successfully, but a camera recording probably won’t because sensor noise and compression artifacts will create tiny differences between frames.

Old versions:

Version 01 (2007):

  • First release, no smoke comes out, seems to work.
Like Frame Subtractor? Donations are appreciated. (sorry, not tax-deductible)