Raspberry Pi remote webcam

This will allow you to create a remote webcam for your Raspberry Pi so that you can view it from any computer on the local network. For this instructable you will need:

• Raspberry Pi with an Whezzy Raspbian installed and internet connection established
• Webcam (I use PS3 Eye Camera, but it will work with most USB webcams)
• IP address on your local network (this can be found with the command $ ifconfig and should be something like: 192.168.1.105)

Raspberry Pi remote webcam

Step 1: Getting started

Run up your Raspberry Pi to the command prompt

Install the webcam server software using the following command:
$ sudo apt-get install motion

This will take a few minutes to download and install but once it has finished and takes you back to the command prompt we are ready to continue.

Step 2: Configure the software

Next we need to edit some of the config files so that the motion service will start on run up and be available on local network.

First we will edit the motion.conf file by typing:
$ sudo nano /etc/motion/motion.conf

This is quite a large conf file but the points you need to edit are:
DAEMON = OFF (change to ON)
Webcam_localhost = ON (Change to OFF)

Step 3: Set the service up

Next we need to enable the Daemon (service):
$ sudo nano /etc/default/motion
start_motion_daemon = no (change to yes)

Raspberry Pi remote webcam software code

Step 4: Start her up 🙂

Ensure your webcam is plugged into the usb port on your Raspberry Pi and start the service:
$ sudo service motion start

If you want to stop the service then use the command:
$ sudo service motion stop

With the service started you can now open a webpage on your normal computer and by going to the IP of the Raspberry pi on port 8081 (in the address bar) you should be able to view your webcam (please note that the one in the picture shows port 8089 as I have set this up in the conf file. The default port is 8081): 192.168.1.105:8081

I hope you have enjoyed this instructable and in the near future I will do a guide to allow you to view your webcam over the internet. The reason I have this is so I can connect my webcam to the eye piece of my telescope and transmit my astroviews over the web so friends and family can see the galaxy.

 

For more detail: Raspberry Pi remote webcam


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *