***!!!!!! If you get a grey screen or it comes on and goes off and USB camera is plugged into Raspberry Pi you may need a Powered USB Hub to make it work!!!!!!!!!***
1st.
sudo apt-get update
sudo apt-get upgrade
2nd.
sudo apt-get install motion
3rd.
sudo nano /etc/motion/motion.conf
Motion.conf in Wheezy
daemon on
webcam_localhost off
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) 1280 for HD
height 480 (This changes the height of the image displayed) 720 for HD
Motion.conf in Jessie
-Turn deamon On
-Image resolution 640×480
-output_pictures and ffmpeg_output_movies to Off if you don't want to store pictures/clips on your SD card
-stream_localhost to Off in order to have access to your full network
sudo nano /etc/default/motion
start_motion_daemon=yes
sudo service motion start
ifconfig -a get IP Address
Check 192.168.?.?:8081
sudo service motion stop to stop service
***!!!!!! If you get a grey screen or it comes on and goes off and USB camera is plugged into Raspberry Pi you may need a Powered USB Hub to make it work!!!!!!!!!***
To create a text_left new line to stack in camera feed use: %\n example text_left CAMERA %t FrontDoor%\n0000 Grand Blvd%\nBryan,TX 77054 then it will result to CAMERA 1
FrontDoor
0000 Grand Blvd
Bryan,Tx 77054
ls /dev/v4l/by-id/ will list all USB cams
lsusb will give the address of cams
sudo modprobe bcm2835-v4l2 -If you see a grey picture from camera or no picture at all