Pynopticon
Project description
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 streamingPOST /start
: same asp.start()
(after stop, server auto starts pynopticon instance)POST /save
: same asp.save()
. Set?upload=true
to upload to YouTube. Only works ifCLIENT_SECRETS_FILE
is set.POST /stop
: same asp.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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for Pynopticon-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adb1723d13fb6a1de59eeae884b314ed87de6966a02d4cedd164e42a9c970789 |
|
MD5 | 2d26cbe1e0443b87618674db51797d37 |
|
BLAKE2b-256 | 43bfac41ce8a0e47253574120a5f63cd607b11e80622d59f781366ecca71051f |