SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how can i capture image from webcam in php?

    i want to develop a test site that will capture image using webcam with one button click and save it.
    i dont expect complete source code but if anyone can give me basic concept in detail to do this,it would be a great help for me.
    Thanx in advance.

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to realize that PHP is a server side language.
    You will not be able to capture a video from a webcam that is not connected to the server directly.

    Appart from that, I don't know how you could do it.
    PHP is not designed for that, and I don't think that you can dialog with a low-level hardware directly.
    You would need to write a C extension for PHP that would do the bridge between V4L (Video for linux) and something else.

  3. #3
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx tripy. yes, i think i cant do this with php alone.
    if possible,can u help me providing the information "Working with PHP and JAVA".
    you dont have to explain.you can provide me the URL.

  4. #4
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,559
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Most people doing this use flash->red5/haxevideo/flash media server/wowza media server
    Flash will capture video from a webcam and stream it to one of the above server applications which will record to a .flv file on the server

  6. #6
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,559
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    In fact if you just want an image, not video then you can capture a bitmapData object in flash and compress/send to a normal php backend. See:
    http://www.quasimondo.com/archives/000572.php


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •