Skip to main content

play any youtube video ▶ with ASCII in the terminal.

Project description

ascii-yt

play any youtube video ▶ with ASCII in the terminal.

GitHub code size in bytes GitHub Workflow Status PyPI Twitter URL

Screenshot

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:

  1. Using OpenCV module to read each frame in the video

  2. Resize it to the terminal size (if there's not a custom size in the options)

  3. Convert the frame to a grayscale image (black & white)

  4. Mapping each pixel to a given character depending on the grayscale value from black to the white. the default value: " .'~;icok0XN"

  5. finaly display the frame.

Overview
overview

License

Distributed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ascii-yt-2.1.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

ascii_yt-2.1.1-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page