camera
从 MacBook 网络摄像头拍摄照片。当用户要求拍摄照片、图片、快照或查看它们时使用。两个摄像头可供选择 - Brio(显示器正面)和 FaceTime(MacBook 的侧角)。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~therohitdas-cameracURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~therohitdas-camera/file -o therohitdas-camera.md# Camera Skill ## Available Cameras | Camera | Index | Position | Best For | |--------|-------|----------|----------| | **Brio 100** | 0 | On external monitor, facing user directly | Front view, face shots | | **FaceTime HD** | 1 | MacBook on right side, angled toward user | Side/profile view | ## Capture Commands Use `-loglevel error` to suppress ffmpeg spam. Always warm up for 5s (camera needs exposure adjustment). ### Brio (front view) ```bash ffmpeg -loglevel error -f avfoundation -framerate 30 -i "0" -t 5 -y /tmp/brio_warmup.mp4 && \ ffmpeg -loglevel error -sseof -0.5 -i /tmp/brio_warmup.mp4 -frames:v 1 -update 1 -y /tmp/brio.jpg ``` ### FaceTime (side view) **Must use `-pixel_format nv12`** to avoid buffer errors. ```bash ffmpeg -loglevel error -f avfoundation -pixel_format nv12 -framerate 30 -i "1" -t 5 -y /tmp/facetime_warmup.mp4 && \ ffmpeg -loglevel error -sseof -0.5 -i /tmp/facetime_warmup.mp4 -frames:v 1 -update 1 -y /tmp/facetime.jpg ``` ### Both cameras (parallel) Run both commands simultaneously for multi-angle shots. ## Output - Photos saved to `/tmp/brio.jpg` and `/tmp/facetime.jpg` - Warmup videos in `/tmp/*_warmup.mp4` (can be deleted) - Photos are ~80-100KB each ## Gotchas - Close Photo Booth or other camera apps first (can conflict) - FaceTime camera REQUIRES `-pixel_format nv12` or it fails with buffer errors - 5s warmup is necessary for proper exposure --- ## 中文说明 # Camera Skill ## 可用摄像头 | 摄像头 | 索引 | 位置 | 适用场景 | |--------|-------|----------|----------| | **Brio 100** | 0 | 位于外接显示器上,直接面对用户 | 正面视图、面部拍摄 | | **FaceTime HD** | 1 | MacBook 在右侧,向用户倾斜 | 侧面/侧脸视图 | ## 拍摄命令 使用 `-loglevel error` 抑制 ffmpeg 的冗余输出。务必预热 5 秒(摄像头需要调整曝光)。 ### Brio(正面视图) ```bash ffmpeg -loglevel error -f avfoundation -framerate 30 -i "0" -t 5 -y /tmp/brio_warmup.mp4 && \ ffmpeg -loglevel error -sseof -0.5 -i /tmp/brio_warmup.mp4 -frames:v 1 -update 1 -y /tmp/brio.jpg ``` ### FaceTime(侧面视图) **必须使用 `-pixel_format nv12`** 以避免缓冲区错误。 ```bash ffmpeg -loglevel error -f avfoundation -pixel_format nv12 -framerate 30 -i "1" -t 5 -y /tmp/facetime_warmup.mp4 && \ ffmpeg -loglevel error -sseof -0.5 -i /tmp/facetime_warmup.mp4 -frames:v 1 -update 1 -y /tmp/facetime.jpg ``` ### 两个摄像头(并行) 同时运行两条命令以获取多角度拍摄。 ## 输出 - 照片保存到 `/tmp/brio.jpg` 和 `/tmp/facetime.jpg` - 预热视频位于 `/tmp/*_warmup.mp4`(可删除) - 每张照片约 80-100KB ## 注意事项 - 先关闭 Photo Booth 或其他摄像头应用(可能冲突) - FaceTime 摄像头**必须**使用 `-pixel_format nv12`,否则会因缓冲区错误而失败 - 5 秒预热对于正确曝光是必要的