/    Sign up×
Community /Pin to ProfileBookmark

How to make a audio + video + text chat system in php?

Hello to all,
I came with an idea to develop a system of audio visual chat in php but i would like to know how to capture camera stream with php , is it possible in any means …. i would be interested in knowing the procedure to do so , please help me i wanna put it on my website.

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 29.2014 — Since the camera is on the user's PC, and PHP (normally) is running on the web server, that aspect of the application will probably not be a PHP issue -- you'll need something running on the browser (Flash, Java applet, whatever?) to handle it. In fact, you'll probably end up doing most of the actual chat work in the browser, and PHP will just be used to establish the initial connections between clients. (And at this point you're getting pretty far out of my area of expertise, such as it is.)
Copy linkTweet thisAlerts:
@Error404Apr 29.2014 — If you're open to using open source libraries, there probably are a bunch out there that can help you out and be easily integrated in your chat system, such as this (however I've never used it, just found it on Google).

If you want to do it by yourself, PHP won't be able to do what you want as the user needs (and should) give explicit permission before their hardware is accessed.

Opera supports navigator.getUserMedia() but I'm not sure whether other browsers support it and mobile devices are going to be a whole other story. Check out these links that should help you out:

  • - Link 1

  • - Link 2

  • - Link 3
  • Copy linkTweet thisAlerts:
    @jayantgeekauthorApr 30.2014 — If you're open to using open source libraries, there probably are a bunch out there that can help you out and be easily integrated in your chat system, such as this (however I've never used it, just found it on Google).

    If you want to do it by yourself, PHP won't be able to do what you want as the user needs (and should) give explicit permission before their hardware is accessed.

    Opera supports navigator.getUserMedia() but I'm not sure whether other browsers support it and mobile devices are going to be a whole other story. Check out these links that should help you out:

  • - Link 1

  • - Link 2

  • - Link 3
  • [/QUOTE]


    Thanks for the info ..... I noticed the same that I have to use some client side thing to access the hardware , suppose I program a flash actionscript to access the camera then can you please guide me that how I can redirect that stream to the specified user through php ...... I think I am making myself clear.

    Example : We both are chatting through example.com you logged in through demo1 username and I logged in through demo2 username then actionscript takes my webcam stream then what it has to do , to redirect that stream to your side through the example.com website so that you can see me .... the same has to be done from your side so that I can see you.

    Thanks in advance.

    Really excited with your response.
    Copy linkTweet thisAlerts:
    @jayantgeekauthorApr 30.2014 — Since the camera is on the user's PC, and PHP (normally) is running on the web server, that aspect of the application will probably not be a PHP issue -- you'll need something running on the browser (Flash, Java applet, whatever?) to handle it. In fact, you'll probably end up doing most of the actual chat work in the browser, and PHP will just be used to establish the initial connections between clients. (And at this point you're getting pretty far out of my area of expertise, such as it is.)[/QUOTE]

    Thanks for the quick reply , I will try to do something similar to access the hardware ........ Thanks again.
    Copy linkTweet thisAlerts:
    @Error404Apr 30.2014 — Thanks for the info ..... I noticed the same that I have to use some client side thing to access the hardware , suppose I program a flash actionscript to access the camera then can you please guide me that how I can redirect that stream to the specified user through php ...... I think I am making myself clear.

    Example : We both are chatting through example.com you logged in through demo1 username and I logged in through demo2 username then actionscript takes my webcam stream then what it has to do , to redirect that stream to your side through the example.com website so that you can see me .... the same has to be done from your side so that I can see you.

    Thanks in advance.

    Really excited with your response.[/QUOTE]


    Keep in mind, before you do any programming for this, you need to have a server that can handle this. From what I've read (since this idea also got me interested ? ) is to have a video streaming server, although these seem a bit complex to set up and usually aren't free. On the other hand, there's HTTP streaming, which can be done from a free server. For this, I figure you can create a default <video> tag that each webcam would link to. Since each camera would have a unique link, there wouldn't be any problem in multiple users simultaneously uploading and downloading (assuming the server can handle it). Flash certainly can be used for this, however, an alternative is Java. You most likely will need to use AJAX to send the data to the server for PHP to have access, so if you don't know AJAX yet, you should familiarize yourself with it (can be done with pure JavaScript or frameworks such as jQuery).

    As for how you'd direct that stream to the specific user, well, I haven't done it before so I'd have to figure it out first. My suggestion though would be to find an open source library (there's a lot for this) and check how they're doing it. Don't copy them but just understand the logic.
    Copy linkTweet thisAlerts:
    @jayantgeekauthorApr 30.2014 — Keep in mind, before you do any programming for this, you need to have a server that can handle this. From what I've read (since this idea also got me interested ? ) is to have a video streaming server, although these seem a bit complex to set up and usually aren't free. On the other hand, there's HTTP streaming, which can be done from a free server. For this, I figure you can create a default <video> tag that each webcam would link to. Since each camera would have a unique link, there wouldn't be any problem in multiple users simultaneously uploading and downloading (assuming the server can handle it). Flash certainly can be used for this, however, an alternative is Java. You most likely will need to use AJAX to send the data to the server for PHP to have access, so if you don't know AJAX yet, you should familiarize yourself with it (can be done with pure JavaScript or frameworks such as jQuery).

    As for how you'd direct that stream to the specific user, well, I haven't done it before so I'd have to figure it out first. My suggestion though would be to find an open source library (there's a lot for this) and check how they're doing it. Don't copy them but just understand the logic.[/QUOTE]



    Glad to hear that you also liked the idea , I know ajax from jquery and can you please name 1 or 2 library so that I can download and have a look on them as how they are doing it ....... thanks again ....
    Copy linkTweet thisAlerts:
    @jayantgeekauthorApr 30.2014 — Keep in mind, before you do any programming for this, you need to have a server that can handle this. From what I've read (since this idea also got me interested ? ) is to have a video streaming server, although these seem a bit complex to set up and usually aren't free. On the other hand, there's HTTP streaming, which can be done from a free server. For this, I figure you can create a default <video> tag that each webcam would link to. Since each camera would have a unique link, there wouldn't be any problem in multiple users simultaneously uploading and downloading (assuming the server can handle it). Flash certainly can be used for this, however, an alternative is Java. You most likely will need to use AJAX to send the data to the server for PHP to have access, so if you don't know AJAX yet, you should familiarize yourself with it (can be done with pure JavaScript or frameworks such as jQuery).

    As for how you'd direct that stream to the specific user, well, I haven't done it before so I'd have to figure it out first. My suggestion though would be to find an open source library (there's a lot for this) and check how they're doing it. Don't copy them but just understand the logic.[/QUOTE]


    Here are some things I found out related to the topic

    AjaxCam

    Firefox get user media test page (example) Please see how mozilla folks do it .....
    ×

    Success!

    Help @jayantgeek spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...