如何在Mac上运行控制台命令来拍照?[重复]


8

我知道我可以通过Photo Booth应用程序使用内置相机自拍照。但是,有没有一种方法可以通过命令行以lolcommits样式捕获图像?


1
我想到了“跑步时自拍照”,我想到了各种可怕的事故……
o0'。

Answers:


10

最简单的方法是一个名为“ ImageSnap ” 的程序。您可以通过在终端中键入命令imagesnap来拍摄iSight照片。

All commands:

 USAGE: imagesnap [options] [filename]
Version: 0.2.5
Captures an image from a video device and saves it in a file.
If no device is specified, the system default will be used.
If no filename is specfied, snapshot.jpg will be used.
Supported image types: JPEG, TIFF, PNG, GIF, BMP
  -h          This help message
  -v          Verbose mode
  -l          List available video devices
  -t x.xx     Take a picture every x.xx seconds
  -q          Quiet mode. Do not output any text
  -w x.xx     Warmup. Delay snapshot x.xx seconds after turning on camera
  -d device   Use named video device

只需将imagesnap命令合并到cron作业或命令的工作流程中即可。ImageSnap也可以通过自制软件获得:

brew install imagesnap 

似乎需要完整安装Xcode:-o
Honza Javorek 2015年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.