Advertisement

Terminal Tip: ASCII-ify your Videos

I'm kind of on an ASCII kick this weekend. Having already brought you ASCII banners, I thought I'd follow that up with ASCII video playback. Apple's ASCII Movie Player, which you can download here, allows you to view any QuickTime compatible media from the Terminal. Above, you see last week's episode of Heroes--that's Peter, in case you didn't recognize him from the screen shot.

The ASCII Movie Player disk image contains a compiled Universal Binary application file. This means you don't need any developer tools to compile or run this utility. Drag a copy into your favorite folder (it doesn't have to be /Applications; /usr/local/bin might make more sense), launch Terminal, navigate to the executable and run it from the command line. e.g. % ./ASCIIMoviePlayer /Volumes/Data/Downloads/Heroes/X22-Heroes.m4v

With ASCII Movie Player, you can play any media that works with QuickTime. So if you've got Perian installed, for example, you can ascii-fy your DivX or Xvid videos as well as your MPEG-4s and QuickTime MOVs, and so forth. And, since QuickTime also allows you to open and display still images, you can use ASCIIMoviePlayer to load and display most digital photographs.

As a rule of thumb, display looks best with white-on-black rather than Terminal's default black-on-white. To switch this, select Terminal -> Window Settings, choose Color from the Inspector pop-up and update the Normal Text and Background Color settings.

Update: colorized version can be found here.

Update 2: Both Mplayer and VLC provide ASCII art output using the -libcaca module. (Caca stands for Color AsCii Art.) In VLC, use Settings > Preferences > Video > Output modules > Advanced options > Video output module > Color ASCII art video output (courtesy of JeffreyAtW over at Digg). More details here. In MPlayer, the AAlib supports black and white ASCII conversion and cacalib supports full color ASCII. Details here. mplayer -vo aa videoname or use mplayer -vo caca videoname for color ASCII (but with a performance hit due to the colors).