Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How do I access my default video camera on my mac? I know on Linux it is /dev/video0 but my Mac does not have that. I'm trying to capture my webcam into ffmpeg

ffmpeg -i /dev/video0

But it won't work because /dev/video0 doesn't exist.

share|improve this question
    
Technically, the API for calling the camera exists in the Aqua layer, so you would have to negotiate that entire framework. It's a huge security risk so I doubt it will ever be made as easy as /dev/videoX, but I've been way wrong before :-) –  bmike Aug 2 '11 at 19:45
    
Also - why not expand the question to say what you want to do - there might be many built in tools that do what you want to do even if your familiar tool is missing. You might be looking for a knife and some matches when the mac has delivery service and you could straight out just order a pizza. –  bmike Aug 2 '11 at 20:09
    
Some great programs that help in capture video have popped up over there command line control of the built in camera –  bmike Aug 24 '11 at 19:56

2 Answers 2

Macs use the AVFoundation framework to expose the camera programatically.

You'll want to start with the StopNGo sample project if you've got a copy of Xcode. (and just browsing the source may help figure if you care to go down that path without needing Xcode to make a decision)

It would be a big security risk to expose that API to the terminal on every mac by default, but someone may have writen a bridge you could use.

You might need to ask that specifically on the programming sites. Your query looking for an equivalent to attaching a pre-existing device is advanced consumer and on-topic here. Getting into API usage is generally off topic even when the simple "consumer" answer is "no - the equivalent video device isn't available on Mac OS X"

share|improve this answer

Unfortunately, it appears that ffmpeg can't record using the iSight, as reported in a ffmpeg-users thread.

Really a shame that Apple doesn't expose this functionality!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.