Skip to content

waektus/ASCII_Video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Player Video Creator

Convert any video into ASCII art — play it directly in your terminal or export it as an MP4.

╔══════════════════════════════════════════════════════════════════════════╗
║                                                                          ║
║    █████╗ ███████╗ ██████╗██╗██╗     ██████╗ ██╗      █████╗ ██╗   ██╗  ║
║   ██╔══██╗██╔════╝██╔════╝██║██║     ██╔══██╗██║     ██╔══██╗╚██╗ ██╔╝  ║
║   ███████║███████╗██║     ██║██║     ██████╔╝██║     ███████║  ╚████╔╝  ║
║   ██╔══██║╚════██║██║     ██║██║     ██╔═══╝ ██║     ██╔══██║   ╚██╔╝   ║
║   ██║  ██║███████║╚██████╗██║██║     ██║     ███████╗██║  ██║    ██║    ║
║   ╚═╝  ╚═╝╚══════╝ ╚═════╝╚═╝╚═╝     ╚═╝     ╚══════╝╚═╝  ╚═╝    ╚═╝    ║
║                                                                          ║
║        V I D E O    C R E A T O R    -    B Y    P L A N K T O N        ║
╚══════════════════════════════════════════════════════════════════════════╝

Made by Plankton


Features

  • Terminal playback — watch any video rendered as ASCII art in real time
  • Color mode — preserve original colors using ANSI 24-bit escape codes
  • Auto-fit — auto-scales to your terminal window size, or set a custom width
  • Frame skipping — skip every N frames to reduce CPU load
  • Loop mode — repeat playback continuously
  • MP4 export — render every frame as a PNG and compile into an MP4 video
  • Custom backgrounds — choose black, white, blue, or any custom hex color for export

Requirements

  • Python 3.10+
  • Dependencies:
pip install opencv-python pillow numpy

A monospace font (Consolas or Courier New) must be available on your system for export rendering.


Usage

Run the script interactively:

python ASCII_VideoCreate.py

You will be prompted step by step:

Prompt Description
Video path Absolute or relative path to your video file
Character color y to enable ANSI color, N for grayscale
Output width Number of characters wide (blank = auto-fit to terminal)
Skip N frames 1 = every frame, 2 = every other frame, etc.
Loop y to repeat playback until Ctrl+C

Press Ctrl+C at any time during playback to stop.


Exporting to MP4

After playback ends, you will be asked whether to export. If you choose yes:

  1. Create an empty folder on your system and paste its path when prompted
  2. Choose what to keep:
    • 1 — MP4 only (temp PNG frames are deleted)
    • 2 — MP4 + all individual PNG frames
  3. Choose a background color:
    • 1 Black  2 White  3 Blue  4 Custom hex (#RRGGBB)

The output file will be saved as ASCII_Player_Output.mp4 in the folder you provided.


Tips

  • Larger terminal = higher detail. Maximize your window before running for the best result.
  • High-contrast videos (e.g. animations, cartoons) produce cleaner ASCII output than live-action footage.
  • Grayscale mode is faster than color mode, especially on lower-end machines.
  • Skip frames if playback feels choppy — try skip = 2 or skip = 3 first.
  • On Windows, run in Windows Terminal for proper ANSI color support.

ASCII Character Set

Characters are mapped from darkest to brightest:

 .'`^",:;Il!i><~+_-?][}{1)(|\/tfjrxnuvczmwqpdbkhao*#MW&8%B@$0QSXGZJKPHDAUYTRENVLCF

Project Structure

ASCII_VideoCreate.py       # Main script — all logic in one file
Section Responsibility
ANSI Terminal escape codes and color helpers
VideoInfo, PlaybackConfig, ExportConfig Typed data containers
frame_to_ascii_* Frame → ASCII conversion (grayscale & color)
ascii_to_image ASCII char map → PIL Image (for export)
play_engine Terminal playback loop with threading
export_flow PNG frame rendering + MP4 compilation
main Interactive CLI entry point

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages