Posts: 122
Joined: Thu Nov 01, 2012 4:58 pm
Location: Kitchener, ON, Canada, Earth
Contact: Website

Trouble installing mjpg-streamer

Wed Aug 28, 2013 4:49 pm

Got my 2nd pi and wanted to experiment with streaming pictures/video using the camera board to any browser.
Found this nice guide by Miguel Grinberg ... d-android
Installation procedure calls for the follwoing:

Code: Select all

$ sudo apt-get install libjpeg8-dev
$ sudo apt-get install imagemagick
$ tar xvzf mjpg-streamer-r63.tar.gz
$ cd mjpg-streamer-r63
$ make
However at the last step I'm getting the following error:
gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o mjpg_streamer.o mjpg_streamer.c
mjpg_streamer.c:27:28: fatal error: linux/videodev.h: no such file or directory
compilation terminated.
make: *** [mjpg_streamer.o] Error1

Looks like the linux subfolder is missing. After googling it, appears that some people have the same issue while others are able to install it properly.

Has anyone seen the answer for this?


Posts: 442
Joined: Mon May 13, 2013 9:25 am
Location: Ivrea, TO (Italy)

Re: Trouble installing mjpg-streamer

Wed Aug 28, 2013 7:01 pm

I had a similar problem when I was trying to use a DVB-T usb device.
Probably you need the kernel source of the Raspberry Pi.
Check here.

Posts: 4
Joined: Tue Jul 16, 2013 5:33 pm

Re: Trouble installing mjpg-streamer

Sat Sep 07, 2013 3:56 pm has the answer to that particular problem.

It is:
# apt-get install libjpeg8-dev

and then create a symbolic link:
# ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h - See more at: ... Cpj4P.dpuf

BTW, I have a failure with missing after following the make. I used both the .63 version and the svn process, and the file did not make.

There is an mjpg-streamer-experimental somewhere in pi land. I would like to find that instead.

Posts: 11
Joined: Sun Oct 09, 2016 3:49 am

Re: Trouble installing mjpg-streamer

Sat Oct 15, 2016 6:53 pm

Iam having the same problem, try everything nothing works :| , Can someone help me? !

User avatar
Posts: 10725
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Trouble installing mjpg-streamer

Sat Oct 15, 2016 6:58 pm

This discussion from earlier today on the same topic appears to have a happy ending...


User avatar
Posts: 376
Joined: Sat Mar 03, 2012 3:51 pm
Location: Middle England
Contact: Website

Re: Trouble installing mjpg-streamer

Sat Oct 15, 2016 8:43 pm

Not a direct reply to your question, but I've had quite good results (latency about 2s, frame rate around 10/15fps) using MotionEye with a v1 Pi Cam and a Pi Zero. Link to the software from the Pi Hut's ZeroView page. I've accessed the stream with browsers on Linux and Android - I don't have Windows.

For robot control I've had better latency (well under 1s) using netcat but only Linux to Linux. I believe there is a netcat for Android but I haven't tried it. A nice thing about netcat is that it works both ways, eg streaming video from robot to laptop and usb joystick data from laptop to robot simultaneously.

Return to “Beginners”