Skip to main content

Pynopticon

Project description

Panopticon

Pynopticon

Pynopticon is a video recording utility that saves the last n frames before an interesting event to disk. This is useful if you just want to record the frames leading up to an interesting event.

import time
from pynopticon import Pynopticon

p = Pynopticon(record_frames=100)
p.start()
time.sleep(10)
p.save()

Optionally, you can upload the video to YouTube. This requires a client_secrets.json file, see instructions here.

import time
from pynopticon import Pynopticon, get_authenticated_service

youtube = get_authenticated_service(client_secrets_file="./client_secrets.json")
p = Pynopticon(record_frames=100, youtube=youtube)
p.start()
time.sleep(10)
p.save(upload=True, title="My Video", description="My Description")

There is also a server that exposes an http api, in case if you want to run Pynopticon on an external device.

# without upload:
python -m pynopticon

# with upload:
CLIENT_SECRETS_FILE="client_secrets.json" python -m pynopticon
  • /: visit in browser for live streaming
  • POST /start: same as p.start() (after stop, server auto starts pynopticon instance)
  • POST /save: same as p.save(). Set ?upload=true to upload to YouTube. Only works if CLIENT_SECRETS_FILE is set.
  • POST /stop: same as p.stop()

https://en.wikipedia.org/wiki/Panopticon

Installation

Requires OpenCV!

  • from pip
pip install pynopticon
  • from source
git clone https://github.com/rickwierenga/pynopticon

Developed for the Sculpting Evolution Group at the MIT Media Lab

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

Pynopticon-0.0.4.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

Pynopticon-0.0.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file Pynopticon-0.0.4.tar.gz.

File metadata

  • Download URL: Pynopticon-0.0.4.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for Pynopticon-0.0.4.tar.gz
Algorithm Hash digest
SHA256 00d510ba3f13339b84f207995ba771490e7f2b64518764e9517fc6b2ab116a7c
MD5 16c238961d9a59370dda5aa0364e27c0
BLAKE2b-256 8a9d9f4af08d17920a7c7785525fa30dfff9704d79b3c584866d759dd3dcd7e6

See more details on using hashes here.

File details

Details for the file Pynopticon-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: Pynopticon-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for Pynopticon-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 adb1723d13fb6a1de59eeae884b314ed87de6966a02d4cedd164e42a9c970789
MD5 2d26cbe1e0443b87618674db51797d37
BLAKE2b-256 43bfac41ce8a0e47253574120a5f63cd607b11e80622d59f781366ecca71051f

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