A very simple library built for streaming video from a remote Raspberry Pi server in realtime.
Project description
RaspiCameraLivestream
A very simple library built for streaming video from a remote Raspberry Pi server in realtime.
How to install:
MacOS or linux:
Open your terminal and type:
sudo python -m pip install rpistream
Windows:
Open cmd as admin and type:
pip install rpistream
Examples:
Streaming from a webcam
Server
from rpistream.camera import Camera
from rpistream.streamserver import Server
def retrieveImage(cam,imgResize):
image = cv2.resize(cam.image,(0,0),fx=imgResize,fy=imgResize)
return image
cam = Camera(mirror=True)
scale=0.5
server = Server(port=5000)
server.serve() # Blocking; waits for a connection before continuing
server.startStream(retrieveImage,[cam,scale]) # Calls retrieveImage(*args) every frame
Client
from rpistream.streamclient import Client
client = Client(serverIp="localhost", WriteFile=True) # Connects to the server
client.startStream() # Starts recieving data and displaying the video
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
rpistream-0.2.2.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file rpistream-0.2.2.tar.gz
.
File metadata
- Download URL: rpistream-0.2.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
326b4f6f8191f03d21c44547df72ed80bb188a8df78e9bd4ef397e7f1db3e0de
|
|
MD5 |
4523555a489bab9dd1450ae7721b8908
|
|
BLAKE2b-256 |
3bc27cc464a8712331de6bf63e5efab24cb60cf8c09a3ada765213e35b3e8b0f
|
File details
Details for the file rpistream-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: rpistream-0.2.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a556f2bb62046d96ab6d6f86150e4ac4851f4dfaf3f49327c8df23bb19c4f2cf
|
|
MD5 |
1390facc78e1e4d70906225599a14683
|
|
BLAKE2b-256 |
afcb39f5a819910395a0ed0d8949bbb4d4d35ac2fa005972f898e8d73e2f3aad
|