table of Contents
Ready to work
Install the camera first.
How to install it will not go into details
Raspberry Pi expansion
Some mirrors will have insufficient space. In this case, you need to expand the capacity to adapt the capacity of the mirror to the capacity of the SD card.
sudo raspi-config
Install dependent libraries
sudo apt-get update #Update software list
sudo apt-get upgrade #Update software
sudo apt-get install subversion #Subversion is a free and open source version control system
sudo apt-get install libjpeg8-dev #JPEG support library
sudo apt-get install imagemagick
sudo apt-get install libv4l-dev #4l is lowercase "L"
sudo apt-get install cmake #download compilation tool
terminal print information, wait for the end
Install git and git source code
Install git
sudo apt-get install git
Download source code
git clone https://github.com/jacksonliam/mjpg-streamer.git
Compile and install mjpeg
cd mjpg-streamer/mjpg-streamer-experimental
make all;sudo make install
Modify the mjpeg startup script
vi start.sh
Modify as follows
Enable camera
sudo raspi-config
verification
/home/pi/mjpg-streamer/mjpg-streamer-experimental
Continue in this directory
./start.sh
If it is in another path, use the absolute path to start
/usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_uvc.so -n -f 30 -r 1280x720" -o "/usr/local/lib/mjpg-streamer/output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
Browser view
Browser input
http://ip:8080
ip is the Raspberry Pi ip address