Giter VIP home page Giter VIP logo

raspi-mjpg-streamer's Introduction

Raspberry Pi - MJPG-streamer as a service

What do you need

Hardware

Software

Quick start

Camera

Building mjpg-streamer

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

Installing the web i/f files

In the same directory (mjpg-streamer-experimental)

sudo mkdir /usr/local/share/mjpg-streamer
sudo cp -R www /usr/local/share/mjpg-streamer/

Installling the plugin libs

In the same directory (mjpg-streamer-experimental)

sudo mkdir /usr/local/lib/mjpg-streamer
sudo cp *.so /usr/local/lib/mjpg-streamer

Setting path for dynamic libraries

  • clone this repository
  • cd raspi-mjpg-streamer
  • copy the ld config file
sudo cp mjpg-streamer-ld.conf /etc/ld.so.conf.d/mjpg-streamer.conf
  • re-scan dynamic libraries
sudo ldconfig

Check whether mjpg-streamer can be run

If your path includes /usr/local/bin (in which mjpg-streamer will have been installed by the default build process), then check if you can succesfully run:

mjpg_streamer -o "output_http.so -w /usr/local/share/mjpg-streamer/www" -i "input_raspicam.so -fps 10 --width 1024 --height 576"

If you test this as user pi, user pi should be part of group video

Create user

Create a user, e.g. user webcam and add it to group video.

sudo adduser webcam
sudo adduser webcam video

Install service files

Copy the service and default files from this repo to the right system directories.

sudo cp cammjpgstreamer.service /etc/systemd/system
sudo cp mjpg-streamer-default /etc/default/mjpg-streamer

Enable the service

  • Run sudo systemctl daemon-reload to scan the new service file.
  • Enable the service by issuing the command: sudo systemctl enable cammjpgstreamer.service

Start the service

  • sudo systemctl start cammjpgstreamer.service

See the results

  • Use a browser on a computer connected to the same network as the raspberry pi.
  • http://:8080/

Web interface

TODO: Create a patch file to correct aspect ratio's of images in web interface (4:3 -> 16:9)

raspi-mjpg-streamer's People

Stargazers

 avatar

Watchers

 avatar

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.