Skip to main content

Python YouTube Concentric Circles Image

Project description

PYTCHI

Python YouTube Concentric Circles Image

You Huh?? No H in pytcci?

Me Are you serious?

Installation

pip3 install pytchi

Dependances:

  • opencv-python-headless
  • pycairo
  • python-slugify

Usage

Following console code produces:

  • a PNG image from this video then replaces it with a fixed width 1080px image ;
  • a SVG image from this video using 1 image every 2 seconds and then cleans for it only remains the final image
  • 3 PNG images from this playlist using random line extraction instead of diagonal (default). Note that URL has just to contain a list variable so that pytchi produces an image for each video of that playlist.
>>> import pytchi
>>> o = pytchi.pytchi('https://www.youtube.com/watch?v=IjxkCokODEs')
>>> o.to_img() # export to png
>>> o.to_img(1080) # or with desired image's dimension
>>> p = pytchi.pytchi('https://www.youtube.com/watch?v=PVyS9JwtFoQ')
>>> p.step = 2 # every 2 seconds of the video (default is 1)
>>> p.to_svg() # export to svg
>>> p.clean(all) # deletes temporary files so that p object is unsable now!
>>> q = pytchi.pytchi('https://www.youtube.com/watch?v=gxAaO2rsdIs&list=PLZHQObOWTQDOcxqQ36Vow3TdTRjkdSvT-&index=2')
>>> q.xmth = 'random'
>>> q.to_img(800)

Outputs

Copyright

2021 / D. COBAC / CC-BY-NC-SA

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pytchi-0.1-py3-none-any.whl (16.6 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