How to create live video streaming website in php

I have a PHP/AJAX/MYSQL chat application. I want to add video chatting to my application. How can I create live video streaming to be used for live video conferences/chatting in a PHP application. What are the key-terms I need to know if I wanted to build such a system? Is it a good idea in the first place to use PHP? Is there something I'm not thinking about? What other languages can I use, perhaps in conjunction with PHP?

How to create live video streaming website in php

asked Oct 21, 2008 at 23:53

I am not saying that you have to abandon PHP, but you need different technologies here.

Let's start off simple (without Akamai :-)) and think about the implications here. Video, chat, etc. - it's all client-side in the beginning. The user has a webcam, you want to grab the signal somehow and send it to the server. There is no PHP so far.

I know that Flash supports this though (check this tutorial on webcams and flash) so you could use Flash to transport the content to the server. I think if you'll stay with Flash, then Flex (flex and webcam tutorial) is probably a good idea to look into.

So those are just the basics, maybe it gives you an idea of where you need to research because obviously this won't give you a full video chat inside your app yet. For starters, you will need some sort of way to record the streams and re-publish them so others see other people from the chat, etc..

I'm also not sure how much traffic and bandwidth this is gonna consume though and generally, you will need way more than a Stackoverflow question to solve this issue. Best would be to do a full spec of your app and then hire some people to help you build it.

HTH!

answered Oct 22, 2008 at 1:42

TillTill

22k4 gold badges58 silver badges88 bronze badges

2

Please note that the below described service is no longer available as it was based on FLV media (Flash)

This project which utilizes the Red5, Flex and PHP for Live Video Streaming and Recording has many features

  1. Stream Live video to the viewers

  2. Record the streams from your cam or other video input devices to the server

  3. Preview the recorded streams and files and thumbnail the frame which you would like to display for the video.

  4. Upload the videos from your computer and convert them to FLV which can be streamed using Red5 .

  5. Choose from any resolutions

  6. Can be plugged to any script

  7. Each website user can have a separate Directory for storing their videos and thumbnails use this link http://code.google.com/p/red5-flex-streamer/

How to create live video streaming website in php

SaschaM78

4,2384 gold badges33 silver badges40 bronze badges

answered Oct 1, 2013 at 7:12

ShaniShani

1422 silver badges9 bronze badges

PHP will let you build the pages of your site that make up your video conferencing and chat applications, but it won't deliver or stream video for you - PHP runs on the server only and renders out HTML to a client browser.

For the video, the first thing you'll need is a live streaming account with someone like akamai or the numerous others in the field. Using this account gives you an ingress point for your video - ie: the server that you will stream your live video up to.

Next, you want to get your video out to the browsers - windows media player, flash or silverlight will let you achieve this - embedding the appropriate control for your chosen technology into your page (using PHP or whatever) and given the address of your live video feed.

PHP (or other scripting language) would be used to build the chat part of the application and bring the whole thing together (the chat and the embedded video player).

Hope this helps.

answered Oct 22, 2008 at 0:45

deepcode.co.ukdeepcode.co.uk

1,4641 gold badge14 silver badges22 bronze badges

PHP/AJAX/MySQL will not be enough for creating the live video streaming application There is a similar thread here. It primarily suggests using Flex or Silverlight.

answered Oct 22, 2008 at 0:11

GauravGaurav

4861 gold badge3 silver badges5 bronze badges

For live video conferencing you can't ignore the need of a streaming server.

Yes, flash will let you display video from a webcam within the local flash control, but that won't let you then send that video over the network - for that you need a streaming server to send it to.

If you're going to build something like this it's prudent to think about how you're going to host the video from a very early stage as it will influence how you build the application. Flash/Flex/Silverlight/Windows Media....etc....

answered Oct 22, 2008 at 4:34

deepcode.co.ukdeepcode.co.uk

1,4641 gold badge14 silver badges22 bronze badges

There are a lot of "off-the-shelf" 'servers' that will run in your environment. Most of these utilize the aforementioned Flex or Silverlight to implement the actual video itself but I'm pretty sure all will run under LAMP/PHP.

The challenges will picking the best software from everything that's available and getting your hosting-provider to let you stream video (it goes without saying that streaming is heavy on bandwidth).

Marcus Adams

51.9k9 gold badges90 silver badges141 bronze badges

answered Jan 25, 2010 at 11:24

ConanConan

111 bronze badge

0

You can easily build a website as per the requirements. PHP will be there to handle the website development part. All the hosting and normal website development will work just as it is. However, for the streaming part, you will have to choose a good streaming service. Whether it is Red5 or Adobe, you can choose from plenty of services.

Choose a service that provides a dedicated storage to get something done right. If you do not know how to configure the server properly, you can just choose a streaming service. Good services often give a CDN that helps broadcast the stream efficiently. Simply launch your website in PHP and embed the YouTube player in the said web page to get it working.

answered Aug 5, 2019 at 10:49

Same problem/answer here, quoted below

I'm assuming you mean that you want to run your own private video calls, not simply link to Skype calls or similar. You really have 2 options here: host it yourself, or use a hosted solution and integrate it into your product.


Self-Hosted ----------------- This is messy. This can all be accomplished with PHP, but that is probably not the most advisable solution, as it is not the best tool for the job on all sides. Flash is much more efficient at a/v capture and transport on the user end. You can try to do this without flash, but you will have headaches. HTML5 may make your life easier, but if you're shooting for maximum compatibility, flash is the simplest way to go for creating the client. Then, as far as the actual server side that will relay the audio/video, you could write a chat server in php, but you're better off using an open source project, like janenz00's mention of red5, that's already built and interfacing with it through your client (if it doesn't already have one). Or you could homebrew a flash client as mentioned before and hook it up to a flash streaming server on both sides...either way it gets complicated fast, and is beyond my expertise to help you with at all.


Hosted Service ----------------- All in, my recommendation, unless you want to administer a ridiculous setup of many complex servers and failure points is to use a hosted service like UserPlane or similar and offload all the processing and technical work to people who are good at that, and then worry about interfacing with their api and getting their client well integrated into your site. You will be a happier developer if you do.

answered Oct 8, 2012 at 13:42

jimcavolijimcavoli

8349 silver badges21 bronze badges

How do I create a live streaming website?

How to Set Up a Live Streaming Website.
Set the Requirements to Create a List of Features. ... .
Choose a Business Model. ... .
Get Domain Name and Web Hosting. ... .
Invest in Live Recording Equipment. ... .
Choose and Encoding Software. ... .
Secure a Reliable Internet Connection. ... .
Choose a Live Website Streaming Video Platform..

How do I add Livestream to my website?

How to Embed Live Streaming Video on Your Website.
Choose a Live Streaming Platform. The first step in embedding a live video on your website is investing in a live streaming platform. ... .
Create a Live Channel. ... .
Generate an Embed Code. ... .
Paste the Embed Code. ... .
Save Your Changes..

How do I create a live streaming video on Web app?

Check out 6 key steps on how to create a live streaming app..
Step 1 – Define your audience and their needs. ... .
Step 2 – Choose Monetization Strategies. ... .
Step 3 – Use a reliable platform for Live Streaming, Hosting and Storage. ... .
Step 4 – Create Great UI/UX Design. ... .
Step 5 – Build and Test your MVP..

How do I create a live streaming site on WordPress?

How to embed a live stream on a WordPress site.
Sign up for a free StreamingVideoProvider account. ... .
Click “Add Media” and switch to the “Live Stream” tab. ... .
(Optional) Enable live chat, description, and playlist. ... .
Click the “Live Studio” button..
Connect Your Live Stream. ... .
Click “Start Broadcasting”..