使用 linux 命令行 (bash) 从网络摄像头拍照

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9391456/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 04:44:32  来源:igfitidea点击:

Take picture from webcam using linux command line (bash)

linuxwebcamcommand-line-interface

提问by Stoppal

I am well aware that there is "exactly" the same questionalready asked, but it seems the user that posted the question initially never took an interest in the question, and the answers all were for windows systems.

我很清楚已经提出了“完全”相同的问题,但似乎最初发布问题的用户从未对这个问题感兴趣,而且答案都是针对 Windows 系统的。

I want to take a picture with the webcam every N time unitsand store it to /tmp/somefolder/for further use with other tools and only keep the last M images.

我想每次都用网络摄像头拍一张照片N time units并将其存储起来以/tmp/somefolder/供其他工具进一步使用,并且只保留last M images.

The main problem is taking the picture to start with, the rest i would have pretty much covered, would be glad for any suggestions. OS: Ubuntu 10.04 x86_64 Webcam: MS LifeCam VX2000 and/or Logitech C210 (both working with cheese)

主要问题是开始拍照,其余的我都会涵盖,很高兴提供任何建议。操作系统:Ubuntu 10.04 x86_64 网络摄像头:MS LifeCam VX2000 和/或 Logitech C210(均使用奶酪)

采纳答案by Alessandro Pezzato

Install mplayer

安装播放器

mplayer -vo png -frames 1 tv://