Watch Videos in ASCII Art

Use MPlayer’s AAlib support to convert any movie into ASCII art.

If you have been on the Internet for any amount of time, chances are that you have come across ASCII art (drawings made with the ASCII text characters) either in an email signature, a web site, or some other place. Good ASCII art can take time and talent to look just right, but you can skip through that effort with AAlib (http://aa-project.sourceforge.net/aalib), a library devoted to converting any image into an ASCII art equivalent. Since a movie is basically a system of moving images, MPlayer has added support for AAlib as a video output option. This means that each frame in the movie is converted to an ASCII equivalent and displayed on the screen. This hack describes the basic options needed to convert a video into ASCII art.

To MPlayer, AAlib is yet another output format that it can support. Like with other output options, if you have compiled mplayer yourself, you will need to compile in support for AAlib. Many of the MPlayer packages out there already support AAlib, so if you use one of those, you should be fine. To turn on AAlib output, just add -vo aa to your mplayer command:

	$ mplayer -vo aa video.avi

If you run this command from the console, MPlayer will display the movie with your console font and at your console’s resolution. If you run this command from a terminal in X, by default a new X terminal will appear and display the movie with a rather large font for each pixel.

The default ...

Get Linux Multimedia Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.