Use iSight webcam as an input stream?

Discussion in 'Mac Programming' started by Chris Corbyn, Jul 18, 2008.

  1. Chris Corbyn macrumors newbie

    Chris Corbyn

    Jun 28, 2008
    Melbourne, Australia
    From Terminal, with something like ffmpeg or vlc how do I refer to my iSight webcam? I've been searching for the past two days and all I find are linux tutorials saying to use /dev/video0 which doesn't exist on Leopard.

    On Tiger, and on Leopard how do I refer to a webcam? video:// ? camera:// ? I'm at a loss here :(
  2. Xino macrumors member

    Sep 5, 2008
  3. Krevnik macrumors 68040


    Sep 8, 2003
    If you can do it, it is likely under /dev/<something>.

    But there is also the possibility that OS X doesn't offer up BSD devices for the iSight. And as ffmpeg tends to rely on these BSD devices to access the video data, it might not be possible.
  4. kainjow Moderator emeritus


    Jun 15, 2000
    Maybe I'm misunderstood but I think in order to get low level access to a device like this you first have to go through IOKit to obtain access. Then you can get raw access but I may be wrong. I've done some picking around with serial devices and low-level iPod access before, and both required going through IOKit first to get low level access.
  5. Krevnik macrumors 68040


    Sep 8, 2003
    You can also go through the BSD way as well. However, the driver needs to make the BSD device available for access for it to work.

    In this case where they are trying to use a CLI tool already written to use BSD device files, they are kinda stuck.
  6. Xino macrumors member

    Sep 5, 2008
    I tried to use IOKit and i'm able to select a device via the IO Registry but can you explain to me how I can speak to that device and getting frames of the camera?

Share This Page