Earlier this week an idea popped into my head: what if there was a fully self-contained file format for storing ASCII art videos?
well, ladies and gents, i present:
ASCII Video Stream (.avs)
ASCII video stream (which is shortened to AVS) is a portable file format that contains a video made with ASCII art. It defines the dimensions, characters, and colors of each frame, and has (relatively) easy-to-understand header bytes.
as a format, AVS is capable of:
- monochrome, 8-bit, and 24-bit color playback (TTY, ANSI, and RGB, respectively)
- auto color remapping (enabling AVS files with higher color depths to be played on devices that can't show the specific colors)
- framerates ranging from 0-127 FPS
- a maximum resolution of 65535x65535 character cells (which is definitely overkill)
- direct conversion of common video formats such as MP4 to AVS via the command-line tool
avsutil - total platform agnosticity, such that AVS files can be played back on a webpage with minimal unpacking and display code
- high compression ratios with simple algorithms such as run-length encoding (not implemented yet)
besides being a format spec, AVS also has its own command-line tool that I wrote: avsutil
avsutil is a simple CLI utility that can be used to do two things (at the moment): encode a video file as AVS, and play back an existing AVS file.
when encoding, avsutil supports several user-configurable options (with more to be added) such as output frame width, exposure scaling, and custom framerate.
during decoding (playback, essentially), avsutil will sequentially display each frame found in the AVS file, much in the same way as any other video file. but this one's in your terminal!!