Introduction: How to Stream Live Videos Through Raspberry Pi Using a Webcam

About: Let's be the miscellaneous Channel!

I'm Gonna Show you How to Stream Live Videos through Raspberry!

Also visit Pi My Life Up! : pimylifeup.com/raspberry-pi-webcam-server/

Blog : https://surdeepdevanathan.blogspot.in/2017/09/how-...

Watch the Video to avoid Confusion!

Step 1: Get Your Things Ready!

You need :

  • Raspberry Pi.
  • USB Webcam.
  • PC.
  • USB Cable.
  • Wi-Fi network.

Step 2: Connecting Webcam :

Initiation :

  • Connect the USB Webcam to the Pi.
  • Power up your Pi.
  • Connect it to the Wi-Fi network.
  • Make sure your PC/Laptop are connected to the same network.

Configuration :

  • Now using LX - Terminal Login to your Pi.
  • Follow these steps to Install the Camera Packages: (ENTER THESE COMMANDS)
    • sudo apt-get update
    • sudo apt-get upgrade
    • RESETTING : sudo apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54
    • wget https://github.com/ccrisan/motioneye/wiki/precomp...
      sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb

    • sudo apt-get install curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5

    • wget https://github.com/Motion-Project/motion/releases...

    • sudo dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb

    • sudo apt-get install libmariadbclient18 libpq5 libavcodec57 libavformat57 libavutil55 libswscale4

    • sudo nano /etc/motion/motion.conf (FOLLOW THESE STEPS)

    • ■ 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)

    • sudo nano /etc/default/motion

    • start_motion_daemon=yes

    • Once you’re done simply save and exit by pressing ctrl+x then y.

    • sudo service motion start (TO START)

    • sudo service motion stop (IF YOU WANT TO STOP)

    • sudo service motion restart (RESTART IF IT DOESN'T WORK)

Step 3: Output :

  • Now Open Google Chrome or any Web Browser.
  • Type the Raspberry pi's IP address and the Port number

Eg: 192.168.1.18:8081

  • You should get your Output!
  • If it still doesn't work Watch this Video :

or email : voxton95@gmail.com

We're finally done I hope your's works fine!

Thank You!