Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
if pgrep mjpg_streamer > /dev/null
then
echo "mjpg_streamer already running"
else
LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1&
echo "mjpg_streamer started"
fi
@karaage0703

This comment has been minimized.

Copy link
Owner Author

@karaage0703 karaage0703 commented Oct 25, 2015

For Raspberry Pi + Raspbian(Jessie) + Raspicam(Camera Module)
mjpg streamer script

At first, install mjpg-streamer for raspicam

$ sudo apt-get update
$ sudo apt-get install cmake
$ git clone https://github.com/jacksonliam/mjpg-streamer.git mjpg-streamer
$ cd mjpg-streamer/mjpg-streamer-experimental
$ make
$ cd ..
$ sudo mv mjpg-streamer-experimental /opt/mjpg-streamer
$ git clone https://gist.github.com/271f93b212b14d5d04e0.git stream
$ cd stream
$ chmod 755 stream.sh
$ sudo cp stream.sh /usr/local/bin/
$ stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment