communicate with a lewei camera module
Project description
plutocam
Python package to communicate with a Pluto's camera module.
Pluto Camera Live Stream Setup Guide
Prerequisites
Before setting up the Pluto camera live stream, ensure you have the following prerequisites installed on your system:
Installation Steps
Step 1: Download FFmpeg
Download FFmpeg from one of the following sources:
Step 2: Install FFmpeg
Follow the installation instructions based on your operating system:
- Windows: FFmpeg Installation Guide for Windows
- Linux: Install FFmpeg on Ubuntu
- Mac: FFmpeg Installation Guide for Mac
Step 3: Install Python
If Python is not installed on your system, download and install it from the official Python website.
Step 4: Install pylwdrone
Install the plutocam library using pip:
pip install plutocam
Streaming Setup
Step 5: Connect to Pluto Camera
Ensure you are connected to the Pluto camera before proceeding.
Step 6: Start the Stream
Open a terminal and run the following command:
plutocam stream start --out-file - | ffplay -i -fflags nobuffer -flags low_delay -probesize 32 -sync ext -
This command initiates the live stream from the Pluto camera using pylwdrone and FFmpeg.
Additional Resources
For more information refer pluto projects with Python.
Now, you are ready to enjoy live streaming from your Pluto camera!
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
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plutocam-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plutocam-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
043b28a56db429dedf95360d0eaada3c31e585c02d8b559af97efbde775fa864
|
|
| MD5 |
640bf77309b5b6bc8cd814ba4f368f53
|
|
| BLAKE2b-256 |
f3766896e7d99724050050906ccb1b164c1b626d269ff022b4cf74a9a7fb018d
|