webcamserver

Post here if you are a new Porteus member and you're looking for some help.
User avatar
ralcocer
Samurai
Samurai
Posts: 187
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

webcamserver

Post#1 by ralcocer » 02 Jun 2013, 22:24

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

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: webcamserver

Post#2 by Ahau » 02 Jun 2013, 23:50

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
ralcocer
Samurai
Samurai
Posts: 187
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

Re: webcamserver

Post#3 by ralcocer » 03 Jun 2013, 22:23

Did that already but it does the same thing.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: webcamserver

Post#4 by Ahau » 04 Jun 2013, 15:42

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!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: webcamserver

Post#5 by justwantin » 10 Jun 2013, 03:13

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:

User avatar
ralcocer
Samurai
Samurai
Posts: 187
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

Re: webcamserver

Post#6 by ralcocer » 10 Jun 2013, 20:29

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
Last edited by Hamza on 10 Jun 2013, 20:35, edited 1 time in total.
Reason: Added CODE tag

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: webcamserver

Post#7 by Hamza » 10 Jun 2013, 20:35

Please use CODE Tag.
NjVFQzY2Rg==

User avatar
ralcocer
Samurai
Samurai
Posts: 187
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

Re: webcamserver

Post#8 by ralcocer » 10 Jun 2013, 20:51

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.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: webcamserver

Post#9 by Hamza » 11 Jun 2013, 17:38

No problem :)
NjVFQzY2Rg==

Post Reply