-
Notifications
You must be signed in to change notification settings - Fork 87
WebCam
WebCam is a library for PyBBIO to stream video and take snapshots from a webcam connected to the beaglebone black.
It should work for any webcam that is compatible with the v4l2 driver.
It has been tested to work with the following cameras :
Logitech C270
Logitech C920
Logitech C930
Example for using this library can be found here
Example for using this library to embed the video in BBIOServer can be found here
EDIT : GStreamer has to be downloaded for this to work
apt-get install python-gst0.10
apt-get install gstreamer0.10-plugins
Initialises the WebCam object.
video_device_num corresponds to the /dev/video number (eg. /dev/video1). It defaults to 0.
This switches on your camera until stopPipeline() is called.
takes a snap shot and stores it in filename.jpeg
starts streaming video from the webcam to http://your_bbb's_ip_address:port
port defaults to 5000
NOTE : Once port no. is set trying to change it will show an error.
stops the streaming
Switches off your camera.
Same instance can't be used to switch the camera back on after calling this function.
Use the Page.add_video() function to embed the video stream using HTML in the BBIOServer
example can be found here
Documentation for BBIOServer can be found here