Page 1 of 1

webcamserver

Posted: 02 Jun 2013, 22:24
by ralcocer
I am trying to compile webcamserver but I get the error: Could not find linux/videodev.h, tried the headers, V4l, gsstreamer, mjprg-streamer, the camera works wxcam and with skype .

Thanks in advance

Re: webcamserver

Posted: 02 Jun 2013, 23:50
by Ahau
Try adding the "crippled sources" module that corresponds to your arch/version. The linux kernel headers are stripped by default and it looks like webcamserver needs to compile against them.

Re: webcamserver

Posted: 03 Jun 2013, 22:23
by ralcocer
Did that already but it does the same thing.

Re: webcamserver

Posted: 04 Jun 2013, 15:42
by Ahau
Looks like videodev.h is related to an old API that isn't inside the kernel anymore. To preserve functionality, I think they copied that header information into a header in the v4l-utils package. link: http://www.mail-archive.com/linux-media ... 27528.html

Please install v4l-utils (may have to get it from slackware and convert it to a module if it's not in the ppm repo), then create a symlink to the v4l header, where the .configure script is looking for it:

Code: Select all

cd /usr/include/linux
ln -s ../libv4l1-videodev.h videodev.h
Now you should be able to build as normal.

good luck!

Re: webcamserver

Posted: 10 Jun 2013, 03:13
by justwantin
I have had the same problem with compiling mjpg-stream. Check and see if you have videodev2.h

Code: Select all

ls -l /usr/include/linux/videodev2.h
If you have a videodev2.h then sym link a videodev.h to it

Code: Select all

ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
Check and make sure everythings OK like I have here

Code: Select all

root@darkstar:~/builds/mjpg-streamer/mjpg-streamer# ls -l /usr/include/linux/videodev*
lrwxrwxrwx 1 root root    56 Jun  9 21:05 /usr/include/linux/videodev.h -> /usr/src/linux-3.6.11-20130520/include/linux/videodev2.h
-rw-rw-r-- 1 root root 99631 May 17 14:19 /usr/include/linux/videodev2.h
IYou should then be able to compile unless something else I don't know about is wrong :unknown:

Re: webcamserver

Posted: 10 Jun 2013, 20:29
by ralcocer
I found this script and I was able to run the webcamserver without errors, neeeds v4l:

Code: Select all

#!/bin/sh

SERVER_BIN=webcam-server
LOCK_FILE=/var/lock/$SERVER_BIN
RTRN=0
#OPTIONS='-v -g 320x240 -p 8888 -c yourwebcam.com'

start() {

[ -f $LOCK_FILE ] && echo "$SERVER_BIN already started"
[ -f $LOCK_FILE ] && return

echo -n "Starting $SERVER_BIN: "
export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
nohup $SERVER_BIN $OPTIONS > /dev/null 2>/dev/null &
RTRN=$?
[ $RTRN -eq 0 ] && echo Started! || echo FAIL
[ $RTRN -eq 0 ] && touch $LOCK_FILE
}

stop() {
[ -f $LOCK_FILE ] || echo "$SERVER_BIN is not running"
[ -f $LOCK_FILE ] || return
echo -n "Stopping $SERVER_BIN: "
pkill -f "$SERVER_BIN $OPTIONS"
RTRN=$?
rm -f $LOCK_FILE
[ $RTRN -eq 0 ] && echo Stopped! || echo FAIL
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
RTRN=1
esac

exit $RTRN

Re: webcamserver

Posted: 10 Jun 2013, 20:35
by Hamza
Please use CODE Tag.

Re: webcamserver

Posted: 10 Jun 2013, 20:51
by ralcocer
Sorry I was so happy I got it working I forgot, I am going to Mountain View on sunday and I was running out of time.

Re: webcamserver

Posted: 11 Jun 2013, 17:38
by Hamza
No problem :)