← 返回 Skills 市场
johnnynunez

linux-camera

作者 Johnny · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
438
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install linux-camera
功能描述
Capture photos, record video clips, list cameras, and live stream on Linux. Uses V4L2 and ffmpeg. Supports USB webcams and RTSP/IP cameras.
使用说明 (SKILL.md)

Linux Camera Skill

Camera capture skill for Linux systems. Supports USB webcams (V4L2) and network cameras (RTSP).

Skill directory: ~/.openclaw/workspace/skills/linux-camera/

Dependencies

sudo apt-get install -y ffmpeg v4l-utils

Scripts

0. Quick photo (camera_photo.py) — simplest way to take a photo

No flags needed. Just run it.

uv run python scripts/camera_photo.py              # auto-detect camera, timestamped filename
uv run python scripts/camera_photo.py front         # use /dev/video0
uv run python scripts/camera_photo.py back          # use /dev/video2
uv run python scripts/camera_photo.py front pic.jpg # custom filename → /tmp/pic.jpg
uv run python scripts/camera_photo.py /dev/video4   # explicit device path

Camera aliases: front = /dev/video0, back = /dev/video2. Output goes to /tmp/ by default.

1. List available cameras (camera_list.py)

Detects all V4L2 video devices and prints their names, paths, and supported formats.

uv run python scripts/camera_list.py
Parameter Description Default
--json Output as JSON off

2. Take a snapshot (camera_snap.py) — primary, recommended

Captures a single frame from a camera and saves it as a JPEG.

uv run python scripts/camera_snap.py --output /tmp/snapshot.jpg
Parameter Description Default
--device V4L2 device path /dev/video0
--rtsp RTSP URL (use instead of --device for IP cameras)
--output Output file path /tmp/camera_snap.jpg
--width Capture width 1280
--height Capture height 720
--warmup Warmup frames to skip (for exposure adjustment) 5
--quality JPEG quality (1–100) 90

3. Record a video clip (camera_clip.py)

Records a video clip from a camera.

uv run python scripts/camera_clip.py --duration 5 --output /tmp/clip.mp4
Parameter Description Default
--device V4L2 device path /dev/video0
--rtsp RTSP URL (use instead of --device for IP cameras)
--output Output file path /tmp/camera_clip.mp4
--duration Recording duration in seconds 5
--width Capture width 1280
--height Capture height 720
--fps Frames per second 30

4. Live streaming (camera_stream.py)

Multi-format live streaming server. Supports MJPEG (low-latency), HLS (adaptive, mobile-friendly), and RTSP re-streaming.

uv run python scripts/camera_stream.py --port 8090

Open http://\x3Cdevice-ip>:8090 in a browser to view the MJPEG stream.

Parameter Description Default
--device V4L2 device path /dev/video0
--rtsp RTSP input URL (use instead of --device for IP cameras)
--port HTTP server port 8090
--width Capture width 640
--height Capture height 480
--fps Target frames per second 15
--enable-hls Enable HLS output (adaptive bitrate, mobile-friendly) off
--enable-rtsp Enable RTSP re-stream output off
--rtsp-port RTSP server port (when --enable-rtsp is used) 8554

Endpoints:

URL Description
http://\x3Cip>:8090/ MJPEG stream (works in \x3Cimg> tags and browsers)
http://\x3Cip>:8090/snap Single JPEG snapshot
http://\x3Cip>:8090/hls HLS live page (requires --enable-hls)
http://\x3Cip>:8090/hls/stream.m3u8 HLS playlist for VLC or mobile players
rtsp://\x3Cip>:8554/live RTSP stream (requires --enable-rtsp)
http://\x3Cip>:8090/status JSON status (frame age, size, active outputs)

Examples

# List cameras
uv run python scripts/camera_list.py

# Snapshot from default webcam
uv run python scripts/camera_snap.py

# Snapshot from a specific camera
uv run python scripts/camera_snap.py --device /dev/video2 --output /tmp/photo.jpg

# Snapshot from an IP camera
uv run python scripts/camera_snap.py --rtsp rtsp://user:[email protected]:554/stream1

# Record 10 seconds of video
uv run python scripts/camera_clip.py --duration 10

# MJPEG stream (low-latency, view in browser)
uv run python scripts/camera_stream.py --port 8090

# MJPEG + HLS stream (adaptive bitrate for mobile / remote)
uv run python scripts/camera_stream.py --port 8090 --enable-hls

# Full streaming: MJPEG + HLS + RTSP re-stream
uv run python scripts/camera_stream.py --port 8090 --enable-hls --enable-rtsp

# Stream from an IP camera as input
uv run python scripts/camera_stream.py --rtsp rtsp://user:[email protected]:554/stream1 --enable-hls

# High-res stream at 30fps
uv run python scripts/camera_stream.py --width 1280 --height 720 --fps 30

Multiple cameras

If you have multiple cameras (e.g. /dev/video0 and /dev/video2), specify the device:

# List all cameras
uv run python scripts/camera_list.py

# Snap from camera 0
uv run python scripts/camera_snap.py --device /dev/video0 --output /tmp/cam0.jpg

# Snap from camera 2
uv run python scripts/camera_snap.py --device /dev/video2 --output /tmp/cam2.jpg

# Stream camera 0 on port 8090, camera 2 on port 8091
uv run python scripts/camera_stream.py --device /dev/video0 --port 8090
uv run python scripts/camera_stream.py --device /dev/video2 --port 8091

Coordinate with robot arm

Combine with the soarm-control skill to look at something and take a photo:

# Move arm to look at the desktop
uv run python ~/.openclaw/workspace/skills/soarm-control/scripts/soarm_set_joints.py \
    --shoulder-pan 1.626 --shoulder-lift -42.110 --elbow-flex 32.088 \
    --wrist-flex 78.242 --wrist-roll -95.077

# Capture what the camera sees
uv run python scripts/camera_snap.py --output /tmp/desktop.jpg
安全使用建议
This skill appears to do what it says (capture and stream cameras), but consider these practical security things before installing or running it: - Install ffmpeg and v4l-utils as the SKILL.md recommends; registry metadata should be updated to list these dependencies. - Beware of network exposure: the streaming server listens on the host and (by default) will be reachable from other devices. If you run this on a machine with internet access, restrict binding/firewall rules or run only on a private network. - RTSP URLs containing credentials (rtsp://user:pass@host/...) may leak secrets via process lists or logs. Prefer credentialless local devices or secure, ephemeral credentials; avoid embedding passwords on command lines. - The HLS/RTSP outputs are unauthenticated by the script. If you need access control, add authentication or place the server behind a firewall/proxy that enforces it. - The scripts will read /dev/video* devices and write files (e.g., /tmp or an HLS directory). Run as an appropriate user and ensure camera/device permissions are correct. - If you need stronger assurances, review the included scripts locally (they are readable) and run them in a controlled environment (isolated network or container) before exposing to wider networks.
功能分析
Type: OpenClaw Skill Name: linux-camera Version: 1.0.0 The linux-camera skill bundle provides legitimate tools for managing cameras on Linux systems, including device discovery, photo/video capture, and a local streaming server. The scripts (camera_list.py, camera_snap.py, camera_stream.py, etc.) utilize standard system utilities like ffmpeg and v4l2-ctl via safe subprocess calls without shell=True. There is no evidence of data exfiltration, persistence mechanisms, or malicious prompt injection; the code's behavior is entirely consistent with its stated purpose of providing camera functionality to the OpenClaw agent.
能力评估
Purpose & Capability
Name/description (V4L2 + ffmpeg camera capture and streaming) align with the included Python scripts. The scripts perform listing, snapshots, clips, and live streaming as described. Minor inconsistency: registry metadata lists no required binaries, but SKILL.md explicitly requires ffmpeg and v4l-utils (these are reasonable and expected for the stated purpose).
Instruction Scope
SKILL.md instructs the agent to install ffmpeg and v4l-utils and to run the included scripts — all within the declared camera use-case. However the streaming server binds to network interfaces (HTTP server and optional RTSP re-stream) and serves outputs with Access-Control-Allow-Origin: *. The runtime instructions and examples also show passing RTSP URLs (which may include credentials). These are legitimate for streaming but are operational security concerns (exposing camera feeds and possible credential leakage).
Install Mechanism
There is no installer that downloads remote code; the package is delivered as source files and SKILL.md. No external archives or obscure URLs are fetched by an installer. The scripts rely on system packages (ffmpeg, v4l-utils) which the SKILL.md asks the user to install via apt — a normal, low-risk approach.
Credentials
The skill does not request environment variables or external credentials in metadata, which is appropriate. Caution: RTSP input examples show URLs containing user:pass@host, and these URLs may be provided as command-line arguments — such credentials can appear in process listings or logs and therefore risk exposure. Also the metadata omission of required binaries (ffmpeg/v4l-utils) should be corrected but is not malicious.
Persistence & Privilege
always is false and the skill is user-invocable only. It does not modify other skills or system-wide configs. It runs user-started processes and writes HLS segment files to disk (configurable), which is expected for this functionality.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install linux-camera
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /linux-camera 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of linux-camera skill. - Capture photos, record video clips, and live stream from USB webcams (V4L2) or IP/RTSP cameras on Linux. - Includes scripts to quickly take photos, list available cameras, capture high-quality snapshots, and record video clips. - Live streaming supports MJPEG (web), HLS (adaptive/mobile), and RTSP re-streaming with a built-in server. - Flexible command-line parameters for device selection, resolution, formats, and outputs. - Integrates easily with other robot skills for automated use cases. - Simple installation; uses ffmpeg and v4l-utils.
元数据
Slug linux-camera
版本 1.0.0
许可证 MIT-0
累计安装 4
当前安装数 3
历史版本数 1
常见问题

linux-camera 是什么?

Capture photos, record video clips, list cameras, and live stream on Linux. Uses V4L2 and ffmpeg. Supports USB webcams and RTSP/IP cameras. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 438 次。

如何安装 linux-camera?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install linux-camera」即可一键安装,无需额外配置。

linux-camera 是免费的吗?

是的,linux-camera 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

linux-camera 支持哪些平台?

linux-camera 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 linux-camera?

由 Johnny(@johnnynunez)开发并维护,当前版本 v1.0.0。

💬 留言讨论