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

Dependancies:

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

Usage

Following code produces:

  • two PNG images: first with concentric circles, second with lines from this video;
  • one PNG image (1000px width) with concentric circles from this video
  • one SVG file with concentric circles from this video using 1 image every 2 seconds and then cleans for it only remains the final image
  • 3 PNG images with concentric circles from this playlist using diagonal line extraction instead of random (default) and reversing images: innermost for first images. Note that URL has just to contain a list variable so that pytchi produces an image for each video of that playlist. Each image is 800x800 pixels.
import pytchi
import os


# 
o = pytchi.pytchi('https://www.youtube.com/watch?v=EelPrEojesM')
o.to_img() # export to png (concentric circles)
o.shape = 'lines'
o.to_img() # export to png (rectangle with lines)
#
p = pytchi.pytchi('https://www.youtube.com/watch?v=IjxkCokODEs')
p.to_img(1_000) # outputs a 1000px image
#
q = pytchi.pytchi('https://www.youtube.com/watch?v=PVyS9JwtFoQ')
q.step = 2 # every 2 seconds of the video (default is 1)
q.to_svg() # export to svg
q.clean(all) # deletes temporary files so that p object is unsable now!
#
# playlist: treat several videos
r = pytchi.pytchi('https://www.youtube.com/watch?v=gxAaO2rsdIs&list=PLZHQObOWTQDOcxqQ36Vow3TdTRjkdSvT-')
r.xmth = 'diagonal' # change extraction method
r.reverse = True # reverse order of inserted images
r.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 Distribution

pytchi-0.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

pytchi-0.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file pytchi-0.2.tar.gz.

File metadata

  • Download URL: pytchi-0.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for pytchi-0.2.tar.gz
Algorithm Hash digest
SHA256 d2537052f618a260554f6c57fd9575cd127165b55dac7f5c77d20ee25acc5766
MD5 397fc69a888c716130982e1a3d69b740
BLAKE2b-256 3a69c8579c800ae76fdb2b22d1deded07614f614c7758ce3828cec3792dac77d

See more details on using hashes here.

File details

Details for the file pytchi-0.2-py3-none-any.whl.

File metadata

  • Download URL: pytchi-0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for pytchi-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af7db47a4622037e285c3f4b14e5dd02cae6262b1a3346da043ed13283d729b8
MD5 0f0c036507226d2f58d22af5000ef9bc
BLAKE2b-256 a4985c7659df44f4bd310ed5279d64cb1adff431137149cde28c068c17b3ec82

See more details on using hashes here.

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