Giter VIP home page Giter VIP logo

rpi-mjpg-streamer's Introduction

rpi-mjpg-streamer

Instructions and helper scripts for running mjpg-streamer on Raspberry Pi.

A. Setup mjpg-streamer

enable raspberry pi camera in raspi-config

$ sudo raspi-config

install necessary packages for mjpg-streamer

$ sudo apt-get update

$ sudo apt-get install libv4l-dev libjpeg8-dev subversion imagemagick v4l-utils

build mjpg-streamer

$ svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer

$ cd mjpg-streamer

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

$ make USE_LIBV4L2=true clean all

(for Raspberry Pi Camera boards) setup video4linux

$ sudo modprobe bcm2835-v4l2

$ sudo vi /etc/modules

# add following line
bcm2835-v4l2

$ sudo vi /boot/config.txt

# add following line for disabling RPi camera's LED
disable_camera_led=1

Add yourself to the video group

$ sudo usermod -a -G video $USER

B. Run mjpg-streamer

Clone this repository

$ git clone https://github.com/meinside/rpi-mjpg-streamer.git

Run mjpg-streamer from the shell directly

# copy & edit run-mjpg-streamer.sh to your environment or needs
$ cp rpi-mjpg-streamer/run-mjpg-streamer.sh.sample somewhere/run-mjpg-streamer.sh
$ vi somewhere/run-mjpg-streamer.sh

# then run
$ somewhere/run-mjpg-streamer.sh

Run mjpg-streamer as a service

# copy & edit init/mjpg-streamer to your environment or needs
$ sudo cp rpi-mjpg-streamer/init/mjpg-streamer.sample /etc/init.d/mjpg-streamer
$ sudo chmod +x /etc/init.d/mjpg-streamer
$ sudo vi /etc/init.d/mjpg-streamer

# then register as a boot-up service
$ sudo update-rc.d mjpg-streamer defaults

# or remove it
$ sudo update-rc.d -f mjpg-streamer remove

# and start/stop it
$ sudo service mjpg-streamer start
$ sudo service mjpg-streamer stop

C. Connect

Connect through the web browser:

Connected

Most modern browsers(including mobile browsers like Safari and Chrome) will show the live stream immediately.

rpi-mjpg-streamer's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.