Geuis
Geuis

Reputation: 42277

Does Snow Leopard have /dev/video (how to access webcam from terminal?)

I'm curious if the built-in camera on MacBooks running Snow Leopard can be accessed from the terminal. A simple example on linux would be to

cat /dev/video0/ > file.blah

Mac's don't expose the camera as /video0/, so I'm wondering if its a differently named device or if its not exposed?

Upvotes: 5

Views: 3244

Answers (1)

meduz
meduz

Reputation: 4241

MacFuse used to do that. You're better off with a programmatic solution using something like OpenCV+python for instance with a script like:

#!/usr/bin/env python
import cv
capture = cv.CaptureFromCAM(0)
cv.SaveImage("file.png", cv.QueryFrame(capture))

Upvotes: 4

Related Questions