Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Take picture from webcam using linux command line (bash) [closed]

I am well aware that there is "exactly" the same question already 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.

I want to take a picture with the webcam every N time units and store it to /tmp/somefolder/ for further use with other tools and only keep the 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)

like image 943
Stoppal Avatar asked Feb 22 '12 08:02

Stoppal


People also ask

How do I take a picture with my webcam on Linux?

Open a terminal window. Run Cheese. Cheese should automatically detect your webcam and display live video stream. To record video or take a snapshot, click either on photo or video and select Take a Photo or Start recording.

What command on command line is used to capture a picture?

-f, --full Capture the entire screen. -w, --window=[NAME_PATTERN] Select a window to capture.

How do you abort a command in bash?

There are many methods to quit the bash script, i.e., quit while writing a bash script, while execution, or at run time. One of the many known methods to exit a bash script while writing is the simple shortcut key, i.e., “Ctrl+X”. While at run time, you can exit the code using “Ctrl+Z”.


1 Answers

Install mplayer

mplayer -vo png -frames 1 tv:// 
like image 62
Alessandro Pezzato Avatar answered Sep 28 '22 04:09

Alessandro Pezzato