ascii-yt


Nameascii-yt JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/malkiii/ascii-yt
Summaryplay any youtube video ▶ with ASCII in the terminal.
upload_time2023-04-23 21:47:55
maintainer
docs_urlNone
authorMalki Abdurrahman
requires_python
license
keywords ascii art video youtube linux shell python terminal
VCS
bugtrack_url
requirements opencv-python cap-from-youtube
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align=center>

# ascii-yt

play any youtube video ▶ with ASCII in the terminal.

[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/malkiii/ascii-yt?color=red)](./ascii_video_player)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/malkiii/ascii-yt/publish.yml?color=2fbe50&logo=github)](https://github.com/malkiii/ascii-yt/actions)
[![PyPI](https://img.shields.io/pypi/v/ascii-yt?label=pypi%20version&logo=pypi)](https://pypi.org/project/ascii-yt/)
[![Twitter URL](https://img.shields.io/twitter/url?label=@malkiAbdoo&url=https%3A%2F%2Ftwitter.com%2FmalkiAbdoo)](https://twitter.com/malkiAbdoo)

![Screenshot](./images/example.gif)

</div>

## Requirements

- python 3.3 or above
- Linux or MacOS

## Installation

install it with `pip` command

```bash
$ pip install ascii-yt
```

or use `pip3` in Linux or MacOS

```bash
$ pip3 install ascii-yt
```

## Usage

you can use URL as well between double quotes

```bash
$ ascii-yt "https://www.youtube.com/watch?v=dQw4w9WgXcQ&"
```

### Options

**`--colors`**
Allow to use colors in the ascii video

```bash
$ ascii-yt "URL.." --colors
```

**`-s --size`** Set a custom size and it must be `WIDTHxHEIGHT`

```bash
$ 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"

```bash
$ ascii-yt "URL.." -c " .:!lM" --colors
```

## How it works

ascii-yt is a python program that renders [ASCII](https://en.wikipedia.org/wiki/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.

<details>

<summary>Overview</summary><br>
<img src="https://raw.githubusercontent.com/malkiii/ascii-yt/main/images/explain.jpg" alt="overview" />

</details>

## License

Distributed under the [MIT](https://github.com/malkiii/ascii-yt/blob/main/LICENSE) license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/malkiii/ascii-yt",
    "name": "ascii-yt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ascii,art,video,youtube,linux,shell,python,terminal",
    "author": "Malki Abdurrahman",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/44/be/7ce5a15ac1c7a92062a30c55e7b55da6fa96d4f15f4289be752c9661965d/ascii-yt-2.1.1.tar.gz",
    "platform": null,
    "description": "<div align=center>\n\n# ascii-yt\n\nplay any youtube video \u25b6 with ASCII in the terminal.\n\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/malkiii/ascii-yt?color=red)](./ascii_video_player)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/malkiii/ascii-yt/publish.yml?color=2fbe50&logo=github)](https://github.com/malkiii/ascii-yt/actions)\n[![PyPI](https://img.shields.io/pypi/v/ascii-yt?label=pypi%20version&logo=pypi)](https://pypi.org/project/ascii-yt/)\n[![Twitter URL](https://img.shields.io/twitter/url?label=@malkiAbdoo&url=https%3A%2F%2Ftwitter.com%2FmalkiAbdoo)](https://twitter.com/malkiAbdoo)\n\n![Screenshot](./images/example.gif)\n\n</div>\n\n## Requirements\n\n- python 3.3 or above\n- Linux or MacOS\n\n## Installation\n\ninstall it with `pip` command\n\n```bash\n$ pip install ascii-yt\n```\n\nor use `pip3` in Linux or MacOS\n\n```bash\n$ pip3 install ascii-yt\n```\n\n## Usage\n\nyou can use URL as well between double quotes\n\n```bash\n$ ascii-yt \"https://www.youtube.com/watch?v=dQw4w9WgXcQ&\"\n```\n\n### Options\n\n**`--colors`**\nAllow to use colors in the ascii video\n\n```bash\n$ ascii-yt \"URL..\" --colors\n```\n\n**`-s --size`** Set a custom size and it must be `WIDTHxHEIGHT`\n\n```bash\n$ ascii-yt \"URL..\" -s 110x40\n```\n\n**`-c --chars`**\nAllow using your own characters depending on the grayscale value from black to white. the default value: \" .'~;icok0XN\"\n\n```bash\n$ ascii-yt \"URL..\" -c \" .:!lM\" --colors\n```\n\n## How it works\n\nascii-yt is a python program that renders [ASCII](https://en.wikipedia.org/wiki/ASCII) videos based on 5 steps:\n\n1. Using **OpenCV** module to read each frame in the video\n2. Resize it to the terminal size (if there's not a custom size in the options)\n3. Convert the frame to a grayscale image (black & white)\n4. Mapping each pixel to a given character depending on the grayscale value from black to the white. the default value: `\" .'~;icok0XN\"`\n\n5. finaly display the frame.\n\n<details>\n\n<summary>Overview</summary><br>\n<img src=\"https://raw.githubusercontent.com/malkiii/ascii-yt/main/images/explain.jpg\" alt=\"overview\" />\n\n</details>\n\n## License\n\nDistributed under the [MIT](https://github.com/malkiii/ascii-yt/blob/main/LICENSE) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "play any youtube video \u25b6 with ASCII in the terminal.",
    "version": "2.1.1",
    "split_keywords": [
        "ascii",
        "art",
        "video",
        "youtube",
        "linux",
        "shell",
        "python",
        "terminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67571617d84a2c5ba5c11c747892e9e3ac2b38e0d105487a2e72cd9e717f9edc",
                "md5": "22383a9986e35b60a9c5326dae7461a6",
                "sha256": "d01fd391927813c3cb1267068b47ad9b5a234a2f40690034890707bc2a6fb90e"
            },
            "downloads": -1,
            "filename": "ascii_yt-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22383a9986e35b60a9c5326dae7461a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5865,
            "upload_time": "2023-04-23T21:47:52",
            "upload_time_iso_8601": "2023-04-23T21:47:52.869949Z",
            "url": "https://files.pythonhosted.org/packages/67/57/1617d84a2c5ba5c11c747892e9e3ac2b38e0d105487a2e72cd9e717f9edc/ascii_yt-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44be7ce5a15ac1c7a92062a30c55e7b55da6fa96d4f15f4289be752c9661965d",
                "md5": "1b7cbc46e33e739df19e4c033d310bcf",
                "sha256": "4a076c86bb7a5d3dc750344329498e198e6d53a49ea80817dd25f162838d5ec4"
            },
            "downloads": -1,
            "filename": "ascii-yt-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1b7cbc46e33e739df19e4c033d310bcf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4826,
            "upload_time": "2023-04-23T21:47:55",
            "upload_time_iso_8601": "2023-04-23T21:47:55.781665Z",
            "url": "https://files.pythonhosted.org/packages/44/be/7ce5a15ac1c7a92062a30c55e7b55da6fa96d4f15f4289be752c9661965d/ascii-yt-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-23 21:47:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "malkiii",
    "github_project": "ascii-yt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "opencv-python",
            "specs": [
                [
                    "==",
                    "4.7.0.68"
                ]
            ]
        },
        {
            "name": "cap-from-youtube",
            "specs": []
        }
    ],
    "lcname": "ascii-yt"
}
        
Elapsed time: 0.07812s