If you don’t already have an EyeToy or spare webcam, it’s probably best to wait for the official Raspberry Pi camera module. Reducing the resolution back down to 352×288 apparently fixes the problem, but obviously means lower image fidelity. A powered USB hub may solve the problem, or more drastically, desoldering the two LEDs. I suspect this may be due to the Raspberry Pi not providing quite enough power to run the camera stably. Unfortunately, like the original poster, I noticed that occasional frames had a strange form of corruption ( example), which unfortunately the camera detects as motion (although you can tweak the config file to only trigger after a number of consecutive frames of motion). The files can build up quickly though, particularly if you enable regular snapshots, so make sure you have plenty of space on the SD card you are using. (Again press Ctrl+X, Y then Enter to save changes and quit)Īnd whenever you need to stop the motion daemon, just type:Īnd there you have it – a simple baby monitor, security camera or basis for time-lapse photography! Sudo kill `cat /var/run/motion/motion.pid` If you need to stop the daemon, get its process ID: cat /var/run/motion/motion.pidĪnd kill it (replace 12345 with the ID from the above file): sudo kill 12345Īnd type in or paste the following lines:.You can then start it up in daemon mode: sudo motion Once you are satisfied, press Ctrl+C in the terminal to stop the server.You can work around this by embedding the stream into a simple HTML page, which works fine in Chrome: Īlternatively you can open the stream in VLC. You can also browse to the feed on the Raspberry Pi itself, but you will have to install Chrome or Firefox on it as the built-in Midori browser doesn’t support MJPEG streams. Firefox works fine, but at the time of writing the current stable version of Chrome seems to have a bug with motion JPEG streams, and only shows the first frame. Browse to the IP address of your Raspberry Pi on the port you configured earlier (or 8080 if you didn’t change it) in a Web browser.(Without the sudo, I get permission errors which I haven’t yet figured out how to resolve). Start up ‘motion’ in interactive mode (this is a text-mode app which you can run from the terminal, you don’t need to be in the ‘startx’ GUI: sudo motion -n.These are not necessary for webcam use so you may want to cover them with black electrical tape or similar. The two LEDs (one red, one blue) should illuminate. Now plug the EyeToy into a USB port on your Pi.Just have a browse through the config file which is fairly well-commented and self-explanatory. There are loads of other things you can do such as enable a basic remote control interface, tweak the JPEG quality, set up regular snapshots (by default, snapshots are taken only when motion is detected), customise the text which is overlaid onto the image and change the location to which images are saved (by default these go into /tmp/motion which is deleted whenever the Pi is rebooted). (Press Ctrl+X, Y then Enter to save changes and quit the nano editor) If you want to take regular snapshots whether motion is detected or not, you can change the following line (the value is in seconds): If you want to change the port on which the stream is served (default 8080) – replace 1234 with the desired port number:īy default, the camera will only start capturing images (and video) if it detects motion. If you want the stream to be viewable from other computers on the network (rather than just the Pi itself): To increase the resolution to the maximum supported by the EyeToy, change the following lines: width 640 To enable daemon mode (so you can run the software in the background without it tying up your terminal): This should automatically install the required ‘ffmpeg’ package – if not you can just do sudo apt-get install ffmpeg. ![]() ![]() Install the ‘motion’package: sudo apt-get install motion.The Raspberry Pi supports a number of cameras, not just the EyeToy, so if you have a spare one lying around, give it a go. The steps below are based on this forum thread, with some changes to reflect my own experience. Having heard about the new camera driver built into the kernel of the new Raspbian OS image, I decided to have a play, using my PS3 EyeToy camera.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |