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.1.8.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for rpistream-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a88dc8890030cc2267e2ae21529d4f14d780331020129499c773c730cfcce5f |
|
MD5 | d5d847d6df45df6b7870aed5d3e88d9a |
|
BLAKE2b-256 | 378efa5f20c86a7094f57415c81b4e966f3620aea1c8d3c4ee5bc9952f448671 |