GithubHelp home page GithubHelp logo

leinstay / asciiclip Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 64 KB

CLI tool that applies an ASCII filter to video or image.

Home Page: https://pypi.org/project/asciiclip/

License: MIT License

Python 100.00%
ascii-art image-processing python video-processing

asciiclip's Introduction

ASCII Clip

CLI tool that applies an ASCII filter to video or image.

demo1

Installation

Python package from PyPI

asciiclip is available on PyPI and can be installed with pip (Python 3 with setuptools required):

python3 -m pip install asciiclip

Installing from PyPI is the recommended way of installation, which gives you the latest released version.

Examples

Create an ASCII clip from YouTube video or local video:

asciiclip -o https://www.youtube.com/watch?v=xxxxxxxx -d /dest/
asciiclip -o /from/clip.mp4 -d /to/ -s 10 -e 30

Create an ASCII image of a particular second from YouTube video or local video:

asciiclip -o https://www.youtube.com/watch?v=xxxxxxxx -d /dest/ -r 120
asciiclip -o /from/clip.mp4 -d /to/ -r 5

Create an ASCII image from local image using custom ASCII character list:

asciiclip -o /from/image.png -d /to/ -a ".:;-+*uo@"

Create an ASCII clip using custom settings:

asciiclip -o https://www.youtube.com/watch?v=xxxxxxxx -d /dest/ -a ".:;-+*uo@" -q 1080 -h 6 6 -fs 6

Usage

When you run asciiclip with no arguments help message is displayed, listing all options.

Usage: asciiclip [OPTIONS]

Available options:

  • -o, --source PATH - Link to YouTube video or path to image or video [required]
  • -d, --destination DIRECTORY - Output folder [required]
  • -f, --filename TEXT - Output file name [default: ascii]
  • -s, --start INTEGER - Used to trim video, sets the beginning point in seconds
  • -e, --end INTEGER - Used to trim video, sets the ending point in seconds
  • -r, --frame INTEGER - Turns the frame at a specified second of video into an image (-s/-e will be ignored)
  • -t, --threads INTEGER RANGE - Number of threads used for video processing [default: 8; 1<=x<=32]
  • -a, --chars TEXT - List of ASCII characters arranged from dark to light [default: .;*uo]
  • -p, --preset [720|1080] - A set of settings that will produce a 720p or 1080p output file (-h/-ft/-fs/-q will be ignored)
  • -q, --sourcequality [360|480|720|1080] - Height in pixels to which the video or image will be scaled down (the final result will be about [fontsize/chunk] times this value) [default: 360]
  • -h, --chunk INTEGER RANGE... - Size of the rectangular area that will be consolidated to a single ASCII symbol [default: 2, 2; 0<=x<=128]
  • -g, --gsv FLOAT RANGE... - RGB weights used when desaturating an image or video [default: 0.299, 0.587, 0.114; 0<=x<=1]
  • -c, --compression INTEGER RANGE - PNG compression level [default: 0; 0<=x<=9]
  • -ft, --font FILE - Path to custom font [default: moby.ttf]
  • -fs, --fontsize INTEGER RANGE - Font size [default: 6; 0<=x<=128]
  • -fc, --fontcolor INTEGER RANGE - Font color [default: 255, 255, 255; 0<=x<=255]
  • --keepaspectratio - Preserves original aspect ratio, otherwise if the video is thinner than 16:9 bars will be added to the sides
  • --mute - Removes the audio track from the video
  • --quiet - Suppress all console messages
  • --help - Show this message and exit.

asciiclip's People

Contributors

leinstay avatar

Stargazers

MemeMan avatar Arnab Goswami avatar CJ avatar  avatar Potato avatar  avatar Arturo Martín avatar  avatar  avatar Nikhil avatar c.j.c avatar Agustin Rivera avatar

Watchers

 avatar

Forkers

justwhyit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.