Book Image

Raspberry Pi Sensors

By : Rushi Gajjar
Book Image

Raspberry Pi Sensors

By: Rushi Gajjar

Overview of this book

Table of Contents (16 chapters)
Raspberry Pi Sensors
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Live streaming using a network camera


Have you ever wondered whether the RasPi can be used for live streaming purposes? We are going to stream videos on the RasPi on the localhost network using RasPi as a network camera. There are multiple ways to make use of the RasPi for live streaming:

  • By fixing a camera interfaced with the RasPi being in the same network, you can SSH through the connection and open the camera port through the command-line interface

  • Use open source software motion to enable live streaming at the local web browser

We will be using motion to get access to the RasPi camera. Motion has a built-in HTTP server that enables the camera view from the web browser. Motion can record videos in MPEG format and capture images in JPEG format. These images and videos can be stored wherever you want, and it does support databases such as MySQL. Enter these commands to install motion on the RasPi:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install bison
sudo apt-get -y install...