Skip to main content

communicate with a lewei camera module

Project description

plutocam

Python package to communicate with a Pluto's camera module.

Example Command-line Usage

Stream live video

$ plutocam stream start --out-file - | ffplay -i -fflags nobuffer -flags low_delay -probesize 32 -sync ext -

Record live video then replay later

$ plutocam rec start
$ plutocam rec stop
$ plutocam rec list
index  start              duration  path
[  0]  20200604_04:01:27        95  /mnt/Video/20200604-040126.mp4
[  1]  20200604_04:10:40        20  /mnt/Video/20200604-041040.mp4
success
$ plutocam rec play 0 --out-file - | ffplay -i -

Example Module Usage

Creating the object

>>> import plutocam
>>> drone = plutocam.LWDrone()

Stream live video

>>> for frame in drone.start_video_stream():
>>>     sys.stdout.buffer.write(frame.frame_bytes)

Get a file

>>> with open('video.mp4', 'wb') as fp:
>>>     drone.get_file('/mnt/Video/20200604-041040.mp4', fp)

Take a picture

>>> with open('picture.jpg', 'wb') as fp:
>>>     fp.write(drone.take_picture().data)

Start and stop recording

>>> drone.set_record_plan()
>>> drone.set_record_plan(RecordPlan(active=False))

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

plutocam-0.5.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plutocam-0.5.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file plutocam-0.5.0.tar.gz.

File metadata

  • Download URL: plutocam-0.5.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.0

File hashes

Hashes for plutocam-0.5.0.tar.gz
Algorithm Hash digest
SHA256 743ec8d40fa39e4577786f283a0b5e9657ae3ccaec5455c2d99c7bb6f49c1b83
MD5 8787b8b96d60f26b75076d54a57b5b4c
BLAKE2b-256 f922c725329b9f17e43579af319f6a102726bbe0e599671ca525cc6c572bc5a5

See more details on using hashes here.

File details

Details for the file plutocam-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: plutocam-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.0

File hashes

Hashes for plutocam-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc7bb979f1f5ed0d8b31958a9d6d32835208a36ce2f2d65ae4330b5f3a9aa95
MD5 6cdb010ffa16aac45e4c48a6c0e50e34
BLAKE2b-256 6ea3c566506ab6c03dad377c016342d439bc9d4e3f1bed2156b5c517ae23f685

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page