Technology Software

The Webcam How-To

4.1. Command Line Programs


As implied by the title these do not require the X Window System to operate your camera and capture images.

4.1.1. Streamer


Streamer is a versatile program that allows a capture from a webcam or video device using only the command line. It may be offered in your Linux distribution's Xawtv package, or may need to be fetched separately as in Debian. You can find it and more information at Gerd Knorr's Xawtv homepage .


To take a standard JPEG picture from the command line where the camera is accessed through /dev/video0 :

   

$ streamer -c /dev/video0 -b 16 -o outfile.jpeg
...where -b is the number of colors (in bpp, whether 15, 16, 24 or 32) and -o is the output filename that will be dropped into the current directory (specify -o /path/outfile.jpg to place it elsewhere). If you are going to capture multiple images be sure to append the output file name with zeros, as streamer can name the capture files in sequence, i.e., -o outfile000.jpeg becomes outfile001.jpeg , outfile002.jpeg , and so on.

To make an .avi file:

   

$ streamer -q -c /dev/video0 -f rgb24 -r 3 -t 00:30:00 -o /home/jhs/outfile.avi
...where -q is for 'quiet' execution (no message output), -f is 'format' (rgb24 is TrueColor avi), -r is the frames per second and -t is the time of recording (30 minutes). Streamer can capture raw and Quicktime â„¢ (non-Sorensen) formats and can capture audio as well. See streamer --help for more information.

4.1.2. camE


CamE is a command-line program that works in daemon mode to capture frames from your v4l device for archive or upload (to a webserver, for example) via ftp or scp. You can overlay other graphics, timestamp the frames, or add other dynamic text all by altering the appropriate line in the configuration file. See the camE homepage for more information.

4.1.3. Motion


Motion is a brilliant program that is able to monitor the video signal from one or several webcams. It can record periodic snapshots, and when motion is detected, record an mpeg and/or perform another action such as sending an email or executing a command. It can track and graphically mark the motion it detects, feed files via an http server to your website, stream them to another application and more. The number of command line options may be intimidating; there is however, a Wiki available online that outlines the various command and configuration file options nicely. The motion homepage can be found here .

4.1.4. Webcam


Webcam is an automated command line tool for operating a webcam that is also available from the Xawtv homepage . It is excellent for automated operation such as from a cron job, as it requires no command line options, only a previously edited configuration file (usually ~/.webcamrc ). It is similar to camE above in that one can captures images and upload them to a Web-Server via ftp or ssh.

4.1.5. SANE


SANE, or Scanner Access Now Easy, supports access of v4l devices including webcams in later versions. If you are familiar with using a photographic scanner device in Linux, you may be interested in using SANE for image capture, especially since a few devices double as both scanners and digital cameras. See the relevant sections of the Scanner-HOWTO here .

* License

* The Webcam How-To Index
SHARE
RELATED POSTS on "Technology"
How Do I Print Business Cards With Microsoft Publisher?
How Do I Print Business Cards With Microsoft Publisher?
How to Reduce the Size of Photos Using Adobe Photoshop Elements 3.0
How to Reduce the Size of Photos Using Adobe Photoshop Elements 3.0
Features and Benefits of Project Portfolio Management
Features and Benefits of Project Portfolio Management
Fix Registry - Fix Registry Errors Easily
Fix Registry - Fix Registry Errors Easily
Business Intelligence Solutions and Services
Business Intelligence Solutions and Services
AutoCAD Architecture
AutoCAD Architecture
Best Social Networking Apps
Best Social Networking Apps
IKE
IKE
Help Desk Software by help-desk-software
Help Desk Software by help-desk-software
What's Better - Building a BPM Solution Or Buying One?
What's Better - Building a BPM Solution Or Buying One?
How to Make Music Fade out in Moviemaker
How to Make Music Fade out in Moviemaker
How to Shrink a DVD With Nero Instructions
How to Shrink a DVD With Nero Instructions
Live Chat Software: Four Tips To Help You Get the Most Out of Your Software
Live Chat Software: Four Tips To Help You Get the Most Out of Your Software
How to Stop Rootkits
How to Stop Rootkits
3 First-Rate Foundations for Making Movies
3 First-Rate Foundations for Making Movies
How to Build Game Downloads
How to Build Game Downloads
The Linux Modem How-To
The Linux Modem How-To
Text-Terminals on Linux - 11.6 Terminal Server Connection
Text-Terminals on Linux - 11.6 Terminal Server Connection
The Linux Loadable Kernel Module How-To
The Linux Loadable Kernel Module How-To
How to Create Photo Albums With CSS
How to Create Photo Albums With CSS

Leave Your Reply

*