Raspberry Pi Security Camera

I found tutorial website [https://pimylifeup.com/raspberry-pi-webcam-server/] that explained to me how to do it.

Things you will need
-Raspberry pi
-Usb Webcam
-Display
-Mouse and Keyboard

Starting

-Before starting type these command on terminal update the raspberry pi to the latest version
sudo apt-get update
sudo apt-get upgrade
-There might be a package that is already installed, so type this command


sudo apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54
-Download this packages by inserting the commands to terminal
wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb
sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb
-We also need to install this package
wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb
sudo dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb
-Then install motion
sudo apt-get install Motion
-After you installed motion we have to edit the config file. Type the following command into the terminal
sudo nano /etc/motion/motion.conf
-Find the following line and change it
  • daemon on
  • stream_localhost off
  • Note: Change the following two lines from on to off if you’re having issues with the stream freezing whenever motion occurs.
  • output_pictures off
  • ffmpeg_output_movies off
  • Optional (Don’t include the text in brackets)
  • stream_maxrate 100 (This will allow for real-time streaming but requires more bandwidth & resources)
  • framerate 100 (This will allow for 100 frames to be captured per second allowing for smoother video)
  • width 640 (This changes the width of the image displayed)
  • height 480 (This changes the height of the image displayed)
-Now we have to edit the motion file
sudo nano /etc/default/motion
-Then fix the line to this
start_motion_daemon=yes
-After you've done that we can finally start our Security Camera.
connect the USB webcam to raspberry pi and type following command
sudo service motion start
-If you need to stop type the following command
sudo service motion stop
-Now you can see the webcam being stream on your pi's ip address
https://ip:8081
-If you think that the webcam is not working type the following command

sudo service motion restart


Comments

Post a Comment

Popular posts from this blog

How to make a very simple crystal radio

Turn your Pi into Retro Gaming Console!!!

Broken Jump rope counter