Build mjpg-streamer on Raspberry Pi

mjpg-streamer is one of the popular tools being used commonly among makers. The main reason that makes it popular is that it is lightweight, less dependencies and easy to build and setup.

Make sure to update latest info from Raspbian central repo.

$ sudo apt-get update

if your Pi is new or never been upgraded before, then it is good to run an upgrade.

$ sudo apt-get upgrade

Next is to install several dependencies,

$ sudo apt-get install libv4l-dev libjpeg8-dev
$ sudo apt-get install imagemagick

To grab mjpg-streamer to build, we can use SVN,

$ sudo apt-get install subversion

then get the code,

$ svn co

Final step is to build the project

$ cd mjpg-streamer
$ make USE_LIBV4L2=true

After that, the binary and all default plugins should be created in current directory. You can make a test to see whether it works or not.

$ ./mjpg_streamer -i “./ -y” -o “./”

Open browser at http://localhost:8080/?action=stream

You’re set to go with mjpg-streamer :)