Skip to content
/ img2ascii Public

A fast and simple, command-line based tool that allows you to turn images and videos into ASCII art.

License

Notifications You must be signed in to change notification settings

o7q/img2ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome! img2ascii is a fast and simple, command-line based tool that allows you to turn images and videos into ASCII art.


Example with the video Bad Apple!!


Overview

img2ascii allows you to convert any media format into ASCII art! I made this program as a challenge to see if I could convert a video into ASCII art basically from scratch. * FFmpeg and stb_image carries a little for the first processing step.

This program turns any media format into an ASCII text sequence which can be played via asciiPlayer.exe.
It does not turn it into a video afterwards! If you want it in video form you will need to record the command window.

Powered by

FFmpeg: https://ffmpeg.org
stb: https://github.com/nothings/stb


Usage

Note: While using asciiPlayer, if the command window starts bugging out that means your output frames are bigger than what can be displayed with word wrap. To fix this, maximize the command window while it's playing, hold ctrl + scroll-down to zoom out, un-maximize the command window and re-maximize it, if that doesn't work then just fiddle around with it until it does. You will get the hang of it.

Interface

  • img2ascii

    • Project Name Specify a folder name for the final render
    • Input Media Path Specify the input image/video to be converted into ASCII
    • Frame Size Specify the width and height of the final ASCII image (example: 100x50)
    • Frame Rate Rate at which frames are skipped, this is basically the fps of the final render (type ! to skip this option or if it is an image)
    • ASCII Characters Specify which ASCII characters you want to be included in the final ASCII image. You can choose a number or enter your own in brightness levels low to high
    • ASCII Compression Specify a compression amount for the final render (0 - 255, higher values means higher compression resulting in the final render having less ASCII characters)
    • JPEG Compression Specify a compression amount for the JPEG frames (1 - 31, higher values means higher compression resulting in JPEG artifacts)
  • asciiPlayer

    • Project Folder Path Folder path to play frames from
    • Playback Framerate Playback rate of frames (does not skip frames, it frame drops instead)

img2ascii
Written in C++ and compiled using MinGW G++

asciiPlayer
Written in C++ and compiled using MinGW G++