Skip to content

A python program to view images and videos as ASCII graphics

License

Notifications You must be signed in to change notification settings

Vishesh-dd4723/ASCII-Media-Player

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Media Player

A python program that creates ASCII graphics from images and videos. It can also play videos with subtitle support (given a .srt file)! 😱

🍎 Motivation

You have seen Music Players, Stackoverflow surfers, Hacker News portals etc. in the terminal, so it is the logical next step 😅. Besides, the terminal makes almost everything appear x10 times more cool.

⚗️ Dependencies

Language and Packages

The program runs using python3 The following python packages are used in the program:

  • pysrt
  • opencv-python
  • Pillow
  • numpy

These packages can be installed using any package manager for python like pip, conda, etc.

Terminal Requirements

All POSIX compliant terminals should work well. If you use windows, and the program doesn't work well, try switching to WSL (Windows Subsystem for Linux)

🎥 A Demo

demo-video.mp4

🛠️ Usage

Navigate to the directory of the python script and run the following command

python generate.py $VIDEO_FILENAME $SUBTITLE_FILENAME $OPTION

If you want to run without subtitles then

python generate.py $VIDEO_FILENAME $OPTION

Here $VIDEO_FILENAME and $SUBTITLE_FILENAME are the full path to the files and $OPTION takes values 0 for black and white output and 1 for true color output (see if your terminal supports true color before enabling)

📝 TODO and Future Plans

  • Support 3-bit RGB (8-colors)
  • Support true color (24-bit RGB) visit tc-version branch
  • Support automatic resizing
  • Support B&W output
  • Support subtitles

About

A python program to view images and videos as ASCII graphics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%