This blog was written in May 2016 so you should not have to suffer the pain of earlier users who had to struggle to get motion running on a raspberry Pi. This blog does assume you are using the raspberry pi camera but its a pretty similar setup for other cameras.
Recipe for success:
Pick ONE of the following cameras: A new 8MP camera was released in April 2016 replacing the 5 Megapixel camera but the 5MP is a little cheaper. Decide on whether you want the normal camera or NOIR camera (which is better for night viewing).
Grab a HDMI cable from Poundland as well if you want to test connected to a TV before trying the remote stream.
(1) Install the OS and network (see my blog on install the OS on a raspberry PI)
(2) Use raspi-config to enable the camera.
(3) execute sudo nano /etc/modules and add the following text at the bottom
and use cntrl-x to save
(4) Install motion with the following commands:
sudo apt-get install motion Then ammend the motion config file as follows: edit /etc/motion/motion.conf and ensure the following parameters are set: (this was the most difficult bit to ensure you can watch the stream from your network) sudo nano /etc/motion/motion.conf daemon on framerate 2 # vga recommended if using a B or B+ width 640 heigh 480 # 720p for raspberry pi 2 or 3 only # width 1280 # height 720 ffmpeg_video_codec mpeg4 webcam_localhost off stream_localhost off webcam_localhost off control_localhost off webcontrol_localhost off cntrl-X to save and the reboot the pi with the following command sudo reboot After the PI has rebooted you should be able to see access the stream via http://ip_address_of_pi/:8081 and you should be able to access the control channel on http://ip_address_of_pi/:8080 and thats it. WhereThingsAreBorn :)