Turn Video into Matrix-Style Symbols





Turn Video into Matrix-Style Symbols

The Matrix Trilogy was a pop-culture phenomenon. The streaming green text symbols that appeared in the movie slowly found their way into screensavers, web sites, and even on T-shirts. Here's a way you can watch almost any digital video in a similar way.

In the movie The Matrix, certain people had the ability to look at green characters streaming down a black computer screen and interpret what they meant. [1] It was as if they could see images in the characters. Well, you don't live in the Matrix (or, maybe you do…who knows?), but you can see images in streaming characters with a little help from your computer. Better yet, you can choose which images you'd like to see.

[1] For film geeks: the Wachowski Brothers did pay some homage to Ghost in the Shell.

The conversion of video to a series of characters is often referred to as an ASCII (pronounced "as-kee") movie.


Downloading ASCIIMoviePlayer

If you are using Mac OS X, the QuickTime engine is buried deep in your operating system. To show this fact, some of Apple's engineers designed ASCIIMoviePlayer (http://developer.apple.com/samplecode/ASCIIMoviePlayerSample/ ASCIIMoviePlayerSample.html) to play a QuickTime movie inside a Terminal window, which displays only text. The ASCIIMoviePlayer application takes the input of a video file and interprets its luminance as text-based symbols. It accomplishes this feat through the use of QuickTime.

After downloading ASCIIMoviePlayer you will have a folder containing four items: ASCIIMoviePlayer, ASCIIMoviePlayer.pbproj, build (a folder), and qtplyr.c. The one you are going to be most interested in is the file named ASCIIMoviePlayer, which is the actual application.

The other files contain the pieces necessary for you to build the application from scratch. The actual source code for the application is in qtplyr.c, should you wish to see how it works or even enhance it. If you have installed the Developer's Tools, included with Mac OS X, you can double-click ASCIIMoviePlayer.pbproj to work with the source code.


Running ASCIIMoviePlayer

To run ASCIIMoviePlayer, you need to run the Terminal application. If you are not familiar with Terminal, you can find it in the Utilities folder. The default color for Terminal is black text on a white background.

If you would like to change the color of the text and background in Terminal, choose Terminal Window Settings Color. There is a set of preselected color schemes, one of which is Green on Black. You can also customize the color combination, if you so desire.

To run a movie through ASCIIMoviePlayer, drag-and-drop the ASCIIMoviePlayer application to the Terminal window. Then, drag-and-drop a movie you would like to play (of course, you can type out the commands if you so desire).

When you drag-and-drop a file on the Terminal window, you will notice that the path of the file appears automatically. This is the expected behavior.


Before hitting the Return key, you should maximize the Terminal window by clicking on the Zoom button (the small green button in the upper-left corner of the window). Figure shows a Terminal window about to run ASCIIMoviePlayer using a movie called mymovie.mov.

Terminal, ready to show a movie


Once you are prepared, press the Return key and watch the characters stream along your screen. You should be able to see your movie within the streaming characters. Figure shows a frame from a movie playing in ASCIIMoviePlayer.

Did you take the Red Pill?


Alternate Approaches

There are other programs that are capable of converting movies to ASCII.

QuickASCII (http://sourceforge.net/projects/quickascii/; free, open source) is based on ASCIIMoviePlayer, but it has added optional color output and performance enhancements. QuickASCII runs on Linux, Mac OS X, and other Unix-like operating systems.

MPlayer (http://www.mplayerhq.hu/homepage/; free, open source) is a video player that is available for Windows, Mac OS X, Linux, and just about every other operating system on the planet. It is a capable media player in its own right, but if you add AA-lib (http://aa-project.sourceforge.net/aalib/; free, open source), you can get MPlayer to output ASCII movies by using the -vo aa argument. If you have trouble building AA-lib, there is an installer package at http://sveinbjorn.vefsyn.is/aalib. If you want to add color ASCII output, you can add the libcaca library (http://sam.zoy.org/projects/libcaca/).

Hacking the Hack

Sure, watching the video is fun for a while, but if you want to, you can integrate its output into your movie. For example, you can take an edited scene from your movie and dissolve to the continuation of the scene, only ASCIIfied. There are a couple ways to accomplish this effect:

  • You can record your computer monitor with your digital video camera. If you use this approach, you will need to frame the image carefully, but you do that for all of your shots anyway, right? You might also have to change your camera's and computer monitor's settings in order to capture the image without flicker [Hack #32].

  • You can use a screen-recording program and capture the ASCII movie as a digital movie. I do not recommend this method unless you have very fast hardware and an abundance of hard drive space.

There is also a virtual community of people creating and working with ASCII art. There are ASCII webcams, ASCII pictures, and even ASCII cartoons. ASCII…who woulda thought?


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows