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

    Joined:
    Jun 28, 2008
    Location:
    Melbourne, Australia
    #1
    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

    Joined:
    Sep 5, 2008
  3. Krevnik macrumors 68030

    Krevnik

    Joined:
    Sep 8, 2003
    #3
    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

    kainjow

    Joined:
    Jun 15, 2000
    #4
    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 68030

    Krevnik

    Joined:
    Sep 8, 2003
    #5
    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

    Joined:
    Sep 5, 2008
    #6
    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