Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
jGrabber_1.0a.zip | 2002-08-06 | 331.4 kB | |
jGrabber_1.0a_README.txt | 2002-08-06 | 3.8 kB | |
jGrabber.zip | 2002-08-06 | 331.4 kB | |
Totals: 3 Items | 666.5 kB | 0 |
jGrabber v1.0 Alpha 08/06/2002 Copyright 2002 PeteCode.com ----------------------- jGrabber is an command-line webcam capture utility that is configured via and XML document. It is distributed as a JAR file and requires Java J2SE 1.4 to run. Usage: java -jar jGrabber By default, jGrabber looks for the jgrabber.xml file in the execution directory. However, a specific config file can be specified. Usage: java -jar jGrabber c:\myConfig\jgrabber.xml ------------------- The JGRABBER.XML FILE The jgrabber.xml file is used to configure jgrabber. A sample config file is provided in the /bin directory of this distribution. The top level element is "jgrabber" which contains subelements used to configure the application. It contains the "rootdir" attribute which is used to specify the top directory that the webcam images will be stored The <debug> element is used for setting the debug level of jgrabber. The first attribute is "level" which is used to determine the amount of logging that will take place. The available levels are debug, info, warn, and error. jGrabber ships w/ "info" as the default level. The second attribute is "logfile" which specified the path and name of the file that will record the debug log entries. The <webcams> element is used to specify each webcam that jGrabber will be tracking. It may contain 1 or more <cam> nodes, one for each webcam being grabber. The attributes of the camnode are: - "name": The name of the image. This will be the prefix of the image when it is downloaded - "url": The URL of the webcam image - "reload": The refreshrate in ms. For example, a refresh rate of 15000 will reload the webcam every 15 seconds. - "sleepThreshold": This is the number of duplicate images that can be downloaded before putting the thread in a sleep state. - "sleepTime": The amount of time the individual thread will sleep if its sleepThreshold has been reached. - "username": [Optional] The username to use if the webcam image is protected using Basic Authentication - "password": [Optional] The password to use if the webcam image is protected using Basic Authentication The "sleepThreshold" feature is useful if you are downloading a webcam that is not updated 24 hours a day. For example, if your sleep threshold is set to 4, then your thread will automatically go to sleep after 4 duplicate images have been downloaded. If your sleepTime has been set to 1800000 (30 min), the application will not try to download that webcam image until the 30 minutes has expired. This will save you and the webcam host the bandwidth required to download duplicate images. It will also keep the webcam host's logs from being crowded with duplicate requests. To disable this feature set the sleepThreshold to 0. Sample jgrabber.xml file --------- <?xml version='1.0' encoding='UTF-8'?> <jgrabber rootdir="webcams"> <!-- The --> <debug level="info" logfile="jgrabber.log" /> <!-- sample webcams --> <webcams> <!-- standard webcam --> <cam name="medusa1" reload="1000" sleepThreshold="5" sleepTime="1800000" url="http://216.234.118.40/webcams/medusa_test1.jpg" /> <!-- password protected webcam --> <cam name="medusa2" reload="1000" sleepThreshold="5" sleepTime="1800000" url="http://216.234.118.40/webcams/medusa_test2.jpg" username="myUserName" password="myPassword" /> </webcams> </jgrabber> To Build JGrabber ------------------ An ANT build.xml file and source files have been included in this distribution. The build.xml file is in the /build directory and the source files are in the /src directory. A basic JUNIT test has been added to the /src-test directory. To build jGrabber, run: ant all in the /build directory.