mjpg_streamer.c:27:28: fatal error: videodev.h No such file or directory


I am setting up my BeagleBone w/ OpenROV. Got thru Step 7 no problem but hit the dreaded "mjpg_streamer.c:27:28: fatal error: videodev.h No such file or directory." error when trying to build Mjpg-streamer.

Spent a several hours trying to fight thru it to no avail. I am a beginner/intermediate Linux user.

Step 8

Install mjpg-streamer

Download mjpg-stream:

 wget http://downloads.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz 

Prepare mjpg-streamer for make:

tar zxf mjpg-streamer-r63.tar.gz cd mjpg-streamer-r63.tar.gz 

Make and install OpenCV:

make && sudo make install

Can anyone point me in the right direction?

Also, does the
make && sudo make install above refer to mjpg-streamer, OpenCV, or both?

Thanks in advance,



I've not done the custom image build out myself yet, but are you intentionally not using the pre-built image?


Absolutely none.

The openrov-software install references "the" openrov-image but also references a different image in (https://github.com/codewithpassion/openrov-image) in Step 2. I assumed that the openrov-image(s) were the same and that the openrov-image was the starting point from which to build from.

I see now (and from your question above) that the 1st openrov-image is configured with everything.

Wow. I missed it but the docs could be a little clearer.

Thanks Brian!




I too am a beginner to Linux and ran into the same problem when I downloaded the most recent version of mjpg-streamer. Apparently it uses videodev.h instead of videodev2.h which is in more recent library distrubutions of Linux..at least in my version of Angstrom. I tried to fix it by just changing all the videodev.h to videodev2.h in all the source files that need it. I got it to compile through most of the files but ran into some other problem which I don't recall right now. So I gave up and found a more recent version of mjpg-streamer on the GIT hub site that uses vidodev2.h. You can download this from Dominik's codewithpassion site as "mjpg-streamer or the sourceforge site that it is branched from. You know you have the right version if mjpg_streamer.c has <linux/vidoedev2.h>. I actually used mjpg-streamer-experimental.