Menu

Ascii Video Encoder

I wrote a python program that can take in a video file and convert it to an ascii video.

How it Works

The program is written in Python and leverages ffmpeg to read video files. The program then calculates the optimal font size to display the characters and the dimensions in characters of the output frame. The video is then processed frame by frame. Each frame is scaled down, and the optimal character for each pixel is selected by matching the density of the character with the brightness of the pixel. Then the final frame is generated. This process is done in parallel using multiprocessing. On 12 cores the encoder is capable of encoding a 1-hour video in 1-hour.

I have put some clips that demonstrate its capabilities below.

The Lion King (1994)

The Matrix (1999) in greenscale

Monty Python and the Holy Grail (1983)

Polar Express (2004) in greyscale

Shrek (2004)

The Emperor's New Groove (2000) in the ANSI 16 pallet