loading
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)

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.
<p>Thank you. A bit of configuration needed to disable only localhost streaming:<br>stream_localhost false</p>
<p>Hi </p><p>I cant find a line called Webcam_Localhost</p>
<p>Try type &quot;stream&quot; instead &quot;Webcam&quot; That should help. &quot;stream_Localhost&quot;</p>
Its there alight although I have problems finding every time for some reason
<p>Me too, please help</p>
<p>Try type &quot;stream&quot; instead &quot;Webcam&quot; That should help. &quot;stream_Localhost&quot;</p>
<p>Hi - I couldn't find that line either. I was using 'jessie' on an RPi model 1 as my base operating system. Installing motion on this didn't seem to give me the correct settings in motion.conf.</p><p>I reinstalled with 'wheezy' version of Raspian, then installed motion..... and there they all were. It might have just been the re-install..... but I'm betting it was the version of motion that wheezy pulled in that solved the problem.</p>
<p>Hi - I couldn't find that line either. I was using 'jessie' on an RPi model 1 as my base operating system. Installing motion on this didn't seem to give me the correct settings in motion.conf.</p><p>I reinstalled with 'wheezy' version of Raspian, then installed motion..... and there they all were. It might have just been the re-install..... but I'm betting it was the version of motion that wheezy pulled in that solved the problem.</p>
<p>For the life of me I can not get this to work. I have followed the instructions to a T.. I have a logitech c310 which I see in lsusb so I know it's there. I finish the instructions and run sudo service motion start.... nothing happens. I figure maybe I should reboot the pi. It comes back up.. and the daemon appears to kick in.. lights on the cam!!! ...then a few seconds after the raspberry is back up and again nothing. sudo service motion start yields no results. I have the files edited correctly, and even turned localhost off for both streaming and management but 8080 and 8081 show nothing. Help? Other options? </p>
<p>Hi! I had the same problem and, like others in this thread, noticed that the webcam turned off when motion was detected. The motion config file is set to save pictures when motion is detected. Since I didn't want to store photos nor videos, I disabled these options by setting output_pictures off and ffmpeg_output_movies off in the config file. This allowed the camera to stream without a problem. Jarrad's solution to give permissions to the directory would probably work if you wanted to store pics/videos.</p>
<p>That works perffect for me thanks :)</p>
<p>I had a similar problem until I placed the camera in a position where there was no motion for it to detect. I'm thinking the motion detection is too resource hungry for the Pi?</p>
<p>Got it going on mine, you need to make sure it has permissions for the directory where it saves the photos/videos. I found this out in the syslog. And make sure you have ffmpeg installed</p>
<p>easy to make camera usb view via LAN network/ internet</p><p>http://engineer2you.blogspot.com/2016/05/raspberry-local-ip-webcam-usb.html</p>
<p>Thanks for the great Instructable. It works perfectly! </p><p>Is there a way I can add more information to the web page? I have a temp sensor and would like to have the data displayed on the same page. </p><p>Bruster</p>
<p>So I can connect to it through port 8080, but there is no video feed, just a screen that says</p><p><strong>Motion 3.2.12+git20140228 Running [1] Threads</strong><br><br><a href="http://10.0.0.11:8080/0/" rel="nofollow">All</a></p><p>When I click on the ALL, it shows another blank screen that says </p><p><a href="http://10.0.0.11:8080/" rel="nofollow">&lt;&ndash; back</a><br><br><br><strong>Thread 0</strong><br><br><a href="http://10.0.0.11:8080/0/config" rel="nofollow">config</a><br><br><a href="http://10.0.0.11:8080/0/action" rel="nofollow">action</a><br><br><a href="http://10.0.0.11:8080/0/detection" rel="nofollow">detection</a><br><br><a href="http://10.0.0.11:8080/0/track" rel="nofollow">track</a></p><p>None of these links has a video feed in them.</p><p></p><p>Any ideas?<br></p>
<p>try port 8081</p>
<p>that's the webcontrol interface. check the settings in the motion.conf file in section &quot;HTTP Based Control&quot;.</p><p>BTW: standard port for the video is port 8081, not 8080. maybe it's just that?! if not contact me, i think we can figure that problem out quickly...</p>
<p>And by &quot;blank screen&quot; I just mean it doesn't have anything else other than the text and links: no images, no video, nothing.</p>
<p>hey </p><p>I have set everything up but don't know how to actually view the camera </p><p>I'm new to this so please help</p>
<p>open webbrowser and enter hostip:8081</p>
<p>Can anyone explain in detail or provide me the link where i can read what does 'motion' software do?</p>
<p>My camera LED comes on after entering the command sudo service motion start however after a few seconds it goes off. Also not able to reach IP address:8080? Any thoughts please?</p>
<p>I was able to keep the camera LED on longer by connecting to Ethernet as oppose to WIFI but still not able to reach via either explorer or firefox. Is there a way to see the streaming video on the Raspberry Pi it self to eliminate the network as a possible issue? I did open a port under NAT/Gaming, range 8080 - 8082...base port 8081 TCP/UDP</p>
<p>To view locally use a URL of localhost or 127.0.0.1 follower by':8080'. E.g. http://127.0.0.1:8080</p>
<p>Swweeeet it work for me!!! had do a few tweaks as other suggested in the comments! it would start then die after a few seconds, changed the frame rate etc. </p><p>Thanks!! :) now on to streaming this to remote site.</p><p>Thanks</p>
<p>Hi Guys, I got it to work, but it only works for so long and then I have to type &quot;sudo service motion restart&quot; it will then work for another minute or so? Any ideas?</p><p> Also, its quite blury with movement, will that be the limitation of the pi or webcam?</p>
<p>is it necessary to have a proxy server to view the video on local network/</p>
<p>have u done ur project ?? I am doing something similar 'll u help me a little ?</p>
Not yet ....will be starting it soon
<p>Great instruction! A tip for anyone who wants to increase the framerate of the streaming is to set the fps to the parameter &quot;webcam_maxrate=xx&quot; in the motion.conf file where XX is the desired frames per second. By default the framerate is 1 fps which gives a bad streaming experience. Unfortunately this parameter is frequently forgoten in most tutorials. 15 fps is working fine for me.</p>
<p>i have my final year project ....i want to stream live videos from a simple webcam connect to my raspberry pi ,it should give me a push up notification on my smart phone and then the video streaming should get started...how it will be get done? </p>
<p>good jobs,,working for me,,TY</p>
<p>Nice. This one was pretty easy.</p>
Followed steps, works great! <br>Great job
<p>Works great, also made a tutorial video (this instructable is linked in the description of the video) </p>
First pi project that has worked ! Great!! Cheers! <br>
<p>After using this for a few days I thought of a few other items that would be nice along with a user name and password would adding the ability to turn off the lights on the camera and turn on the microphone. I am using the same camera the author used.</p>
<p>Thanks, this works great. I want to stream the video but was wondering if there was a way to set it up so that a user name and password could be added and how can I make sure that it starts automaticly in the event of a power loss?</p>
<p>How do i start the webcam at boot automatically?</p>
<p>Nice work! I was finally able to get it to work, but I can only get it to work in Firefox browser. Tried Chrome and Internet Explorer but it doesn't work. Chrome acts like nothing was entered at all and Internet Explorer on Windows 10 actually closes the browser after hitting the enter key. Any ideas what the problem could be?</p>
<p>You can also use <a href="https://kerberos.io/" rel="nofollow">Kerberos.io</a>, it's also open-source and a lot more user friendly to install and configure. You can find more information on the website.</p>
<p>Hey Cedric. Saw your work on Kerberos. You've done some amazing work on developing this platform. My question is, will I be able to access my recordings from a remote computer or I'll have to have set a cloud necessarily to do so? I'm familiar with port forwarding so, is it possible to port forward my RPi -running Kerberos- and access it remotely?</p>
<p>Hi Ian,</p><p>I have tried resetting the remote webcam up on a fresh install of wheezy and as long as you only change the bits mentioned it should work fine. check you have the correct IP address, the only thing I can think that may cause the problem is if the webcam is not compatible but from what I have read then the majority should be fine. The whole file from step 3 is massive but another quick test you can do is try going into port: 8080 which is the config port. So you need to type your IP:8080 in the address bar (for me this is set to 192.168.1.105:8080). See if you can access this and if so check the configuration from there. Hope this helps.</p><p>Sat</p>
<p>Is there any way to change the default port? 8080 and 8081 seem to be occupied in my LAN connection.</p>
<p>Yes, ther is a way. In motion.conf find &quot;port&quot; (ctrl+w in nano)</p>
<p>Cheers!</p>
<p>Is there any way to modify the resolution? Right now it's 320x240p..</p>
<p>In motion.conf file search for width(in nano Ctrl+W). Just set width you want, and then set the height you want(it is right below widht). I recommend 640x480, most webcams works with that resolution.</p>

About This Instructable

374,167views

386favorites

License:

More by sat481:Raspberry Pi remote webcam
Add instructable to: