Search code examples
raspberry-piraspbianmicroprocessorsraspberry-pi2

Raspberry-Pi live streaming using web cam


I am new with RASPBERRY PI . But i've successfully completed a project with the use of Brick Pi which is actually a WIFI based moving car. Now i want to enable live camera streaming to my project. Can i do it using my USB webcam ? I actually want to stream it on any browser. If YES, how can i achieve it ?

Is there any better solution than using a webcam ?


Solution

  • Install MJPG-streamer on your Rasperry Pi

    sudo apt-get install libjpeg8-dev imagemagick libv4l-dev

    sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h

    git clone https://github.com/jacksonliam/mjpg-streamer.git

    and then you can use a command like this:

    mjpg_streamer -i “/usr/local/lib/input_uvc.so" -o “/usr/local/lib/output_http.so -p 9000 -w www”

    You can check out this tutorial by Tinkernut, which basicly does what you want as well as some other cool stuff