Camsrv - Streamserver
LiveStream ähnlich motion - im pwc-Paket enthalten
Code:
camsrv -r CIF -d 100 -v --device=/dev/v4l/video0
Hilfe:
camsrv -h
Code:
camsrv v0.3.4
(c)2002 Matthew Painter
Usage: camsrv [options]
Example: camsrv -r VGA -d 100 -v --device /dev/video1
Example: camsrv -w 320 -h 240 -s --file cam.ppm
Example: camsrv --delay 10-2 --script upload.pl --file cam.jpg
General options:
-v --verbose display verbose information (for debugging)
-V --version display version and exit
-W --width NUM width of captured image
-H --height NUM height of captured image
-r --resmode MODE use standard resolution (see below)
-f --file FILENAME save PPM/JPG image of first frame captured and exit
-q --jpegquality NUM JPEG image quality percentage (value between 0 and 100,
defaults to 75)
-p --script FILENAME run FILENAME after each image is captured
-P --port PORT port to run the camsrv server on
-d --delay NUM-NUM | NUM delay (in seconds) between frames are captured
-e --capturedelay NUM portion of delay where camera is enabled (for image stabilisation)
-l --loop loop still image capture. Enabled if streaming is
also enabled
-L --log FILENAME log verbose output messages to FILENAME
-D --device PATH path to video device to use (defaults to /dev/video0)
-S --stream streams to java client. This is enabled by default
if --file is not used
-h --help display help
Philips specific options:
-F --framerate NUM framerate of camera (integer between 4 to 30)
-c --compression NUM camera compression (0..3)
-s --shutter NUM shutter speed (0..65535) default: automatic
-g --agc NUM automatic gain control override (0..65535)
Default resolution modes:
Mode Resolution
sQCIF 128x96
QSIF 160x120
QCIF 176x144
SIF 320x240
CIF 352x288
VGA 640x480
Mvc - Bildgrabber
einfaches motion capture Programm
Code:
mvc version 0.8.9 - motion detection video capture program
Usage: mvc <options>
-B picture brightness value.
-C picture contrast value.
-D run in daemon mode.
-O Base directory for output images. default is current dir.
-o Don't create sub-directories for output.
-t Print timestamp on image.
-d <device> video device (default:/dev/video0).
-e <program> excute a external program while motion detected.
-f {jpeg|png} set output file format. default is jpeg.
-q <quality> jpeg quality setting.
-h print this help.
-i <channel> which input channel to use, default is 1, or 0 if only 1 input.
-m use mono color (grayscale) for capture.
-n {pal|ntsc|secam|auto} video norm to use, default: PAL
-s XxY size of the output image, example: -s 640x480
-a HxV block division number in Horizantal and Vertical. Ex: -a 16x8
-b <diff_block_limit> threshold of hot block number.
-c <diff_color_limit> threshold of block color difference.
-w delay time for each capture(seconds), example: -w 0.5
-l logfile used in daemon mode. default is null.
-v increase verbose level for more details, can multiple applied.
getjpeg - Bildgrabber
* Installation:
Code:
cd /tmp
wget http://ping02.stura.uni-weimar.de/dave/getjpeg
mv getjpeg /usr/bin
cd /usr/bin
chmod +x jpeg
Automation
Cronjob einrichten: (z.B. aller 5min. Neustarten)
Code:
vi /etc/init.d/S51crond
0-59/5 * * * * /usr/sbin/cron.5minutely
einfügen.
Code:
vi /usr/sbin/cron.5minutely
#!/bin/sh
killall -9 motion
logger "motion gekilld"
sleep 5
/usr/bin/motion -c /etc/motion.conf
berechtigungen noch setzen mit
Code:
chmod 0777 /usr/sbin/cron.5minutely
Anzeigen auf dem Router
Anlegen eines Links:
Code:
cd /www
vi 20-cgi-bin-webcam
Text einfügen:
Code:
<TR><TD>
<DIV CLASS="plugin"><A CLASS="plugin" HREF="cgi-bin-webcam.html">Webcam</A></DIV></TD>
</TR>
Dann noch die Site anlegen
Code:
cd /www
vi cgi-bin-webcam.html
und Text einfügen:
Anzeigen als Bild
Code:
#!/bin/sh
export DATE="18.11.2006";SCRIPT=${0#/rom}
export TITLE="Webcam"
. ${SCRIPT%/*}/cgi-bin-pre.sh
cat<<EOF
<html><head>
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="refresh" content="10">
<center>
<H1>Webcam</H1><br>
<img src="bild.jpg" name="Webcambild" width="480" hight="360"><br>
Images refreshed every 10 seconds.
</center>
</body></html>
EOF
. ${SCRIPT%/*}/cgi-bin-post.sh
Anzeigen mit Java Applet (Stream oder Bild)
Code:
#!/bin/sh
export DATE="18.11.2006";SCRIPT=${0#/rom}
export TITLE="Webcam"
. ${SCRIPT%/*}/cgi-bin-pre.sh
cat<<EOF
<center>
<H1>Webcam</H1>
<applet code=com.charliemouse.cambozola.Viewer
archive=cambozola.jar width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;">
<param name="url" value="http://'''IP-Adresse''':8000">
<param name="failureimage" value="offline.jpg">
<param name="accessories" value="ZoomIn,ZoomOut,Pan,Info">
</applet>
</center>
EOF
. ${SCRIPT%/*}/cgi-bin-post.sh
Code:
# Webcam-Paket (JavaApplet-Cambozola, offline-Bild, Link zur Webcam, Webseite ...)
ipkg install http://weimarnetz.de/ipkg/packages/webcam-tools_1_mipsel.ipk
oder einzeln
cd /www
wget http://141.54.160.25/dave/cambozola-0.68/cambozola-server.jar
wget http://141.54.160.25/dave/cambozola-0.68/cambozola.jar
wget http://141.54.160.25/dave/offline.jpg
* das Applet --> Cambozola-Viewer + Server
Geräte die getestet wurden
Router: Asus wl hdd 2,5 ; Yakumo Wireless Storage ; Siemens se505 ; Asus wl500g (alles USB 1.0)