Setting up the camera
There are a few ways in which we could stream a video from the Raspberry Pi camera module to a web page. The easiest of which is to use the Video for Linux 2 (V4 L2) driver (which is documented in greater detail at www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14), which includes a server that allows the camera to be controlled and streamed over a network connection.
First, we will connect and configure the camera in the Raspbian OS and perform the following steps:
With the power disconnected, connect the camera module to the Camera Serial Interface (CSI) port on the Pi just behind the Ethernet port. You can do this by lifting the cable clip, inserting the flat, flex cable, as shown in the next image, and pressing down on the clip such that the cable is firmly held in place:
Next, boot into Raspbian and run the configuration utility:
sudo raspi-config
Select the Enable Camera option using the arrow keys and press Enter:
Select the Enable option...