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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ascii-yt-2.1.1.tar.gz.
File metadata
- Download URL: ascii-yt-2.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a076c86bb7a5d3dc750344329498e198e6d53a49ea80817dd25f162838d5ec4
|
|
| MD5 |
1b7cbc46e33e739df19e4c033d310bcf
|
|
| BLAKE2b-256 |
44be7ce5a15ac1c7a92062a30c55e7b55da6fa96d4f15f4289be752c9661965d
|
File details
Details for the file ascii_yt-2.1.1-py3-none-any.whl.
File metadata
- Download URL: ascii_yt-2.1.1-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.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d01fd391927813c3cb1267068b47ad9b5a234a2f40690034890707bc2a6fb90e
|
|
| MD5 |
22383a9986e35b60a9c5326dae7461a6
|
|
| BLAKE2b-256 |
67571617d84a2c5ba5c11c747892e9e3ac2b38e0d105487a2e72cd9e717f9edc
|