play any youtube video ▶ with ASCII in the terminal.
Project description
Requirements
- python 3.3 or above
- Linux or MacOS
Installation
install it with pip
command
$ pip install ascii-yt
or use pip3
in Linux or MacOS
$ pip3 install ascii-yt
Usage
you can use URL as well between double quotes
$ ascii-yt "https://www.youtube.com/watch?v=dQw4w9WgXcQ&"
Options
--colors
Allow to use colors in the ascii video
$ ascii-yt "URL.." --colors
-s --size
Set a custom size and it must be WIDTHxHEIGHT
$ ascii-yt "URL.." -s 110x40
-c --chars
Allow using your own characters depending on the grayscale value from black to white. the default value: " .'~;icok0XN"
$ ascii-yt "URL.." -c " .:!lM" --colors
How it works
ascii-yt is a python program that renders ASCII videos based on 5 steps:
-
Using OpenCV module to read each frame in the video
-
Resize it to the terminal size (if there's not a custom size in the options)
-
Convert the frame to a grayscale image (black & white)
-
Mapping each pixel to a given character depending on the grayscale value from black to the white. the default value:
" .'~;icok0XN"
-
finaly display the frame.
Overview
License
Distributed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ascii-yt-2.1.0.tar.gz
.
File metadata
- Download URL: ascii-yt-2.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b28a0662747d890dd2260e1bf48923d769b2d0da5c30f24974f14b871d6e2702 |
|
MD5 | 9f8bdfbdb2725df2189a65a235936111 |
|
BLAKE2b-256 | 9f59d2469c985f7d86f9e703eaa0bf0971b21898a0dee7e75c87d9f653f0a882 |
File details
Details for the file ascii_yt-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: ascii_yt-2.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdf72034996a700abadf78ffd29ff50632dc45dec05a4dbdcac7903ecb1002dd |
|
MD5 | eba4092f80ec0193e782b923048d5088 |
|
BLAKE2b-256 | 8a4a5f40dbbb8e91eb1ab67e6fa11621b7445f8ef6ebdac4eba06f40803fa40a |