LinuxCommandLibrary

fswebcam

command-line webcam image capture

TLDR

Capture image

$ fswebcam [image.jpg]
copy
Capture from specific device
$ fswebcam -d [/dev/video0] [image.jpg]
copy
Set resolution
$ fswebcam -r [1280x720] [image.jpg]
copy
Remove banner
$ fswebcam --no-banner [image.jpg]
copy
Add timestamp
$ fswebcam --timestamp "%Y-%m-%d %H:%M" [image.jpg]
copy
Set frame count for better quality
$ fswebcam -F [10] -S [5] [image.jpg]
copy

SYNOPSIS

fswebcam [options] filename

DESCRIPTION

fswebcam is a command-line webcam capture utility. It captures images from V4L2 (Video4Linux) devices and saves them as JPEG or PNG files.
The tool is useful for timelapse photography, security camera snapshots, and automated image capture. It supports overlays, timestamps, and various image adjustments.

PARAMETERS

-d, --device dev

Video device (default /dev/video0).
-r, --resolution WxH
Capture resolution.
-F, --frames n
Capture n frames.
-S, --skip n
Skip n frames before capture.
--no-banner
Remove info banner.
--timestamp format
Add timestamp overlay.
--title text
Set banner title.
--subtitle text
Set banner subtitle.
-q, --quiet
Suppress output.
--png level
Save as PNG with compression.
--jpeg quality
JPEG quality (0-100).

CONFIGURATION

~/.fswebcam

Optional configuration file for default settings.

CAVEATS

Requires V4L2 compatible webcam. Initial frames may be dark (use -S to skip). Resolution must be supported by camera. Some cameras need time to adjust exposure.

HISTORY

fswebcam was written by Philip Heron as a simple command-line tool for capturing webcam images on Linux. It's designed for scripting and automation rather than interactive use.

SEE ALSO

v4l2-ctl(1), ffmpeg(1), motion(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community