1. Installing auxiliary Tools
12 |
sudo apt - get install libjpeg8 - dev sudo apt - get install cmake |
2. Edit the source file
12 |
sudo git clone <a href
=
"https://github.com/jacksonliam/mjpg-streamer"
target
=
"_blank"
>https:
/
/
github.com
/
jacksonliam
/
mjpg
-
streamer<br><
/
a>cd mjpg
-
streamer
/
mjpg
-
streamer
-
experimental
/
plugins
/
input_raspicam
nano input_raspicam.c
|
Configure the Fps,width,height parameter in the file as shown
3. Compiling mjpg Software
Then go to the engineering Mjpg-streamer/mjpg-streamer-experimental and complete the compilation:
Go to the Raspberry Pi settings menu:
Move to the fifth "Enable Camera", enter, press the TAB key to switch to "enable" to confirm the return. Back to the main menu, tab to "Finish" to confirm the return. The Raspberry Pi will restart automatically.
Reboot complete Enter the system, command to enter the Mjpg-streamer-experimental directory, use the following command to start the normal USB camera:
1 |
. / mjpg_streamer - i "./input_uvc.so" - o "./output_http.so -w ./www" |
The instructions for starting the Raspberry Pi dedicated camera Raspicamera are:
1 |
. / mjpg_streamer - i "./input_raspicam.so" - o "./output_http.so -w ./www" |
Some cameras will have an error when executing this command, at least if you do not return to the command prompt at the end, and display "starting ouput", it will be successful.
4, the production of mjpg startup script
Write the following two commands into the script
12 |
cd mjpg - streamer - master / mjpg - streamer - Experimental / mjpg_streamer - i - o <br>chmod 744 jk.sh |
5. Execute mjpg Startup script (Start mjpg)
Finally, open it on the browser: (I'm using a Chrome browser)
HTTP//Your Raspberry Pi's ip:8080
Raspberry PI Development Tour-remote monitoring