Deepees’s Blog

Just another weblog

Raspberry Pi Webcam Server

Posted by deepees on April 28, 2015

Build a Raspberry Pi Webcam Server

Installing Motion with a USB Camera
We will be using a package called motion if you want to learn more about it you can check out their website: Motion.
We will be using the terminal so open up terminal on the Pi or via SSH.
Let’s check for any updates for Raspbian and its packages.
sudo apt-get update
sudo apt-get upgrade
First we will need to download and install motion, to do this enter the following command:
sudo apt-get install motion
Now we need to make some edits to the configuration file (motion.conf)
sudo nano /etc/motion/motion.conf
Find the following lines and change them to the following.
daemon on
webcam_localhost off
Optional (Don’t include the text in brackets)
webcam_maxrate 100 (This will allow for real-time streaming but requires more bandwidth)
framerate 100 (This will allow for 100 frames to be captured per second allowing for smooth video)
width 640 (This changes the width of the image displayed)
height 480 (This changes the height of the image displayed)
Now we need to setup up the daemon, first we need to edit the motion file.
sudo nano /etc/default/motion
Find the following line and change it to the following:
Now make sure the camera is connected and run the following line
sudo service motion start
If you need to stop the service simply run the following command
sudo service motion stop
Now to test it out! We can check out the Raspberry Pi Web Cam Stream at the ip address of our Pi so in your browser go to the following address:
There we have it a fully working Raspberry Pi Webcam server that you can place where ever you would like (Given it is within Wifi range) and be able to view via the web browser. For some reason my Chrome browser was not able to get to it ( most likely becasue I have an addon called https everywhere) When I used firefox it worked fine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: