1

I followed up some Tutorial to install MJPG-Streamer but somehow it will not compile. Anybody know what is wrong?

sudo apt-get update
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
wget http://sourceforge.net/projects/mjpg-streamer/files/latest/download
sudo mv download mjpg.tar.gz
tar  xzvf mjpg.tar.gz
cd   mjpg-streamer-r63
make

Error

spcav4l.c:1117:14: error: ‘BASE_VIDIOCPRIVATE’ undeclared (first use in this function)
spcav4l.c:1117:14: error: invalid operands to binary << (have ‘int *’ and ‘int’)
spcav4l.c:1117:14: error: invalid operands to binary | (have ‘unsigned int’ and ‘int *’)
spcav4l.c:1117:14: error: invalid operands to binary | (have ‘int *’ and ‘unsigned int’)
spcav4l.c:1117:14: warning: passing argument 2 of ‘ioctl’ makes integer from pointer without a cast [enabled by default]
/usr/include/arm-linux-gnueabihf/sys/ioctl.h:42:12: note: expected ‘long unsigned int’ but argument is of type ‘int *’
Makefile:27: recipe for target 'spcav4l.lo' failed
make[1]: *** [spcav4l.lo] Error 1
make[1]: Leaving directory '/home/pi/mjpg/mjpg-streamer-r63/plugins/input_gspcav1'
Makefile:55: recipe for target 'input_gspcav1.so' failed
make: *** [input_gspcav1.so] Error 2

The Full Error Log can be find here: http://pastebin.com/Nuqee6Jh

2

Here are the steps:

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

sudo apt-get install cmake libjpeg8-dev

cd mjpg-streamer-experimental

make

sudo make install

Here is how to run it (in the "mjpg-streamer-experimental" directory):

export LD_LIBRARY_PATH=.

./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so"

Or for a different fps and resolution, try:

./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so -x 1280 -y 720 -fps 15 -ex night"

To check the output on a web browser: http://127.0.0.1:8080/stream.html (change 127.0.0.1 to your own ip address)

  • Thanks. Note that you could also edit your original answer (there's an edit link below it), which is preferable. – Dmitry Grigoryev Oct 6 '16 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.