Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 76 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here



Current HOWTO: Webcam-HOWTO

Framegrabbing Applications

4. Framegrabbing Applications

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.

4.2. GUI(Grapical User Interface)-Based Programs

4.2.1. Xawtv

Xawtv is an X-based program for accessing video devices in Linux including TV tuning devices and webcams. The home page is at http://bytesex.org/xawtv.

When you first try out your webcam, and you think things are configured right, use the -hwscan option:

   $  xawtv -hwscan This is xawtv-3.72, running on Linux/i686 (2.4.21) looking for available devices
   /dev/v4l/video0: OK		[ -device /dev/v4l/video0 ] type : v4l name : BT878(Hauppauge (bt878)) flags: overlay capture tuner
   /dev/v4l/video1: OK		[ -device /dev/v4l/video1 ] type : v4l name : IBM USB Camera           flags: capture

...so now you can see the available devices (your output may differ substantially). Try opening an xterm and running xawtv, grabbing from your webcam video device:

   $  xawtv -c /dev/video1 This is xawtv-3.72, running on Linux/i686 (2.4.21)

...and (hopefully) your camera will begin capturing to a window on your desktop. You may see some error messages in your xterm if things don't work that can be helpful to diagnose configuration problems. If you aren't interested in all that, and things work for you, launch from your window manager's menu next time. You can read about more xawtv options with man xawtv.

4.2.2. Gqcam

Gqcam is a graphical GTK+-based application originally written to access Connectix QuickCams but now supports nearly all Video4Linux compatible webcam devices. It has an intuitive interface that makes viewing, taking snapshots, and configuring webcam settings blissfully easy. It is highly recommended for those who only want to take a picture here and there without editing a configuration file or using the command line.

4.2.3. Camorama

Camorama is a graphical GTK+2.0-based application very similar to gqcam written for the Gnome2 desktop. The home page is here.

4.2.4. GnomeMeeting

GnomeMeeting is a VOIP/IP-Telephony application for the Gnome2 desktop that also supports videoconferencing with a webcam. The homepage can be found at gnomemeeting.org.

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.




Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.12 Seconds