There different ways to use webcam connected to Carambola. I will shortly overview some of them.
You are likely to use this package if you want standalone security server.
Select packages:
make menuconfig
make
opkg install motion
vi /etc/motion.conf
This tool helps stream live video from webcam.
You need camera which supports UVC (list)
By default camera can be accessed from LAN interface. It is not available on WAN port.
make menuconfig
Select:
make
Flash new compiled image.
Open terminal to carambola
opkg update
opkg install mjpg-streamer
mjpg_streamer gets configuration from /etc/config/mjpg-streamer
file, which by default looks like:
config mjpg-streamer core option device "/dev/video0" option resolution "640x480" option fps "25" option port "8080" option enabled "true"
It starts with system.
If you wish, you can start mjpg_streamer manual way:
1. Kill running instance:
killall -9 mjpg_streamer
or
kill -9 `pidof mjpg_streamer`
or
/etc/init.d/mjpg-streamer stop
2. Run it
mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 1600x1200 -f 25" -o "output_http.so -p 8080" mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480 -f 25" -o "output_http.so -p 8080" mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 854x480 -f 25" -o "output_http.so -p 8080"
3. Open browser or ip stream viewer (like VLC or something else) and see video
http://<carambola_ip_address>:8080/?action=stream
or if you wish single image.
http://<carambola_ip_address>:8080/?action=snapshot
This tool is to grab pictures from web camera.
Add USB webcam support as mentioned in motion
Install fswebcam
opkg update opkg install fswebcam
Edit configuration file
vi /tmp/fswebcam.conf
add text
device /dev/video0 input 0 loop 15 skip 20 background resolution 640x480 set brightness=60% set contrast=13% jpeg 95 save /tmp/viewcam.jpg palette MJPEG
In order to run and capture once type:
fswebcam --device /dev/video0 output.jpeg
If you wish to alter resolution type:
fswebcam -d /dev/video0 -r 1600x1200 output.jpeg
Save picture with todays date and time
fswebcam -d /dev/video0 -r 1600x1200 /mnt/picture-`date +%d-%m-%y-%H-%M-%S`.jpeg
In order to start deamon type:
fswebcam -c /tmp/fswebcam.conf
In order to running daemon type:
killall -9 fswebcam
You can simply get image by accessing it using scp