← 返回命令列表

Linux command

fswebcam 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Capture image

fswebcam [image.jpg]

Capture from specific device

fswebcam -d [/dev/video0] [image.jpg]

Set resolution

fswebcam -r [1280x720] [image.jpg]

Remove banner

fswebcam --no-banner [image.jpg]

Add timestamp

fswebcam --timestamp "%Y-%m-%d %H:%M" [image.jpg]

Set frame count for better quality

fswebcam -F [10] -S [5] [image.jpg]

说明

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

参数

-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 level (0-9, or -1 for automatic).
--jpeg _quality_
JPEG quality (0-95, or -1 for automatic).
-i, --input _input_
Set the input to use (number or name, default "0").
--flip _direction_
Flip the image (h for horizontal, v for vertical).
--list-inputs
List available inputs for the selected source.
--list-controls
List available controls and their current values.

FAQ

What is the fswebcam command used for?

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

How do I run a basic fswebcam example?

Run `fswebcam [image.jpg]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d, --device _dev_ do in fswebcam?

Video device (default /dev/video0).