← 返回命令列表

Linux command

cam 命令

文本

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

常用示例

List

cam -l

Example

cam -c [camera_index] --list-controls

Capture frames

cam -c [camera_index] --capture=[frames] --file

Example

cam -c [camera_index] --capture --sdl

说明

cam is a command-line tool for interacting with cameras through the libcamera framework. It can list cameras, display their controls, capture frames, and show live video in a window. libcamera provides a modern camera stack for Linux, replacing older V4L2-only approaches with a more flexible architecture.

参数

-l, --list
List available cameras
-c, --camera _index_
Select camera by index
--list-controls
Show camera controls
--capture _frames_
Capture specified number of frames (0 for unlimited)
--file
Write captured frames to files
--sdl
Display video in SDL window
--list-properties
Show camera properties
--stream _config_
Configure stream parameters (e.g. width, height, pixelformat, role)
--monitor
Monitor for camera hotplug and removal events

FAQ

What is the cam command used for?

cam is a command-line tool for interacting with cameras through the libcamera framework. It can list cameras, display their controls, capture frames, and show live video in a window. libcamera provides a modern camera stack for Linux, replacing older V4L2-only approaches with a more flexible architecture.

How do I run a basic cam example?

Run `cam -l` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l, --list do in cam?

List available cameras