Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Converts your video to ASCII characters, then display them or even convert them into a video!

License

Notifications You must be signed in to change notification settings

private-yusuke/video2asciis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

video2asciis

sample gif

This GIF file is adapted from "Big Buck Bunny" by Blender Foundation, used under CC BY 3.0.
(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org


video2asciis lets you create old-school style videos like shown above.


Requirements

$ pip3 install python-opencv numpy tqdm pymediainfo ffmpeg

Usage

$ ./v2t2v.sh <input> <output> <font>

This handy command generates the converted video in the same resolution as the original.

You can modify some parameters by directly using v2t.py and t2v.py. For details, refer to the output of $ python3 v2t.py -h and $ python3 t2v.py -h.

Note: If the given file doesn't have an audio track, then this script may throw an error. You can manually try t2v.py to obtain what you want.

Play your video in your terminal

You can play your converted texts in your terminal in real time.

  1. $ python3 play.py <input>
  2. Enjoy!

Alternatively, you can also do this:

  1. $ python3 v2t.py <input> out.txt
  2. $ python3 tshow.py out.txt
  3. Enjoy!

If you can't play the file, it's possibly because your terminal is too small to display the entire text. Try reducing the font size of the terminal, or enlarge the dimension of it.

Tips

  • in v2t.py, the threshold between white and black is defined as 90. You may have to change this value by passing -t <value> option, since this value is critical to generate the appropriate results.

    • When there are many bright scenes overall, you may choose 95~110.
  • v2t.py accepts an option -s <size>. This program divides the input frame into pieces that are shaped as size x (size/2). Each piece are then substituted with one character.

    The bigger size you specify, the result is rough and the conversion is faster.

  • v2t.py also supports the custom settings of output frame size.

  • You can convert your image into this style by using image2textimage.py.


Need information in Japanese? If so, you may want this: https://scrapbox.io/public-yusuke/%E6%96%87%E5%AD%97%E5%88%97%E3%81%A7%E5%8B%95%E7%94%BB%E3%82%92%E8%A1%A8%E7%8F%BE%E3%81%99%E3%82%8B

About

Converts your video to ASCII characters, then display them or even convert them into a video!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published