LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cam

Interact with cameras via libcamera

TLDR

List available cameras
$ cam -l
copy
List controls of a camera
$ cam -c [camera_index] --list-controls
copy
Capture frames to files
$ cam -c [camera_index] --capture=[frames] --file
copy
Display camera feed in a window
$ cam -c [camera_index] --capture --sdl
copy

SYNOPSIS

cam [options]

DESCRIPTION

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.

PARAMETERS

-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

INSTALL

sudo apt install libcamera-tools
copy
sudo dnf install libcamera-tools
copy
sudo pacman -S libcamera-tools
copy
sudo apk add libcamera-tools
copy

CAVEATS

Requires libcamera support, which may not be available for all cameras. Some cameras work better with direct V4L2 access.

SEE ALSO

Copied to clipboard
Kai