I am working on an online video streaming application, and I've been asked to work on the video streaming module. But I don't have any knowledge regarding streaming. After doing some search, I got some knowledge about different type of streaming like 1.On demand 2.Live video streaming, and I got a website like http://www.wowza.com which provides solutions for that. Please give your valuable suggestions and some basic knowledge required before working on it.
If you are using php, javascript, jquery technologies. First you need a server that support (RTSP) Real Time Streaming Protocol . Most servers may not have this installed . Check if yours is, if not you need secondary server hosting plan only for streaming. Its not more expensive than regular hosting. Then in the system u need a plugin for managing streaming content and storage. The best and most easy I have come across is http://www.videowhisper.com/ .they have a very good video streaming code to customize and add to your site. If you have your own server, do a little research on red5 a program that helps setup broadcasting. Good luck
Related
The Problem: I need my clients to be able to stream their webcam to my streaming server(for instance Wowza server). I am building my site in PHP.
I have gone through various streaming sites like twitch.tv, livestream.com and found that they all use third party broadcasting software like Wirecast, XSplit broadcaster, OBS etc to stream the Webcam feeds to the server.
Then I came across sites like vLine, Opentokrtc that uses WebRTC for Video chat.
My Question: So, my question is that, is it possible for me to send the stream to the broadcasting servers like Wowza(So that they can then broadcast my live stream) without using broadcasting softwares with only WebRTC? If Yes, then how? If, No, then what are the other alternatives?
PS. I don't want to use Flash, ActionScript here.
You will basically need a server which has a pseudo WebRTC client integrated in it. WebRTC can get the stream but cannot start streaming until a PeerConnection is setup. You can try using various servers/gateways like Janus, Kurento, Licode, FreeSwitch, etc.
Also MediaStream generate by WebRTC can be directly attached to an HTML5 <video> tag.
Using WebRTC for such a use case incurs a high computing cost on the server side and is a rather new technique, which means you should be using it if you know what you are doing.
My suggestion would be to stick to Flash or MPEG-DASH instead - unless what you need must have a very low latency to it and you are fine with paying for it by smaller solution scales.
Unless I misunderstand, I think you're looking to stream video to your server (for distributing using "normal" live-streaming mechanisms), not using WebRTC to stream video from the server.
If so, WebRTC will work, though you'll need a server-side implementation of a fairly full set of the WebRTC protocol including video decoding. These exist, but not in PHP directly of course. This would handle getting realtime audio and video from a client, without needing a plugin on the client, including bandwidth adaptation and error correction.
Once the data is decoded on the server, you have a video+audio datastream you can feed to your live-streaming encoders to stream out.
Wowza does support what you need in order to become the other peer in your WebRTC scenario. From there you can redistribute the stream in whatever way media servers typically do.
This feature is still in "Preview" mode and has some limitations, but does function for most cases. You can request access to this via https://www.wowza.com/products/capabilities/webrtc-streaming-software
I want to let users record video via webcam and then upload the recorded video to the site all through the browser.
Here is an example that works exactly how I want my site to work except it does not seem to capture video, just images.
http://www.xarg.org/project/jquery-webcam-plugin/
Please let me know if there is a way I can customize this or if there is something else out there that I can use.
I want something standalone and don't want to rely on another service to accomplish this.
Thanks!
We've been looking for the same thing, but from my research, it appears there's no way to do it strictly through jquery and Flash without some back end help.
What I've found is three options:
Adobe Flash Media Server
Wowza Media Server
Red5 Media Server
There's advantages and disadvantages to all three. Flash and Wowza are not free, but have great documentation and support. Red5 is free, but the documentation can be lacking depending on what you're doing.
We just signed up for a free 180-day Developer license for Wowza and are currently evaluating that.
HaxeVideo is an multithread FLV streaming server entirely written using the Haxe programming language.
And this link for information Haxe programming language.
But I found an easy way out for me. I have 2 options for you.
youtube api (Free) https://developers.google.com/youtube/youtube_upload_widget
http://nimbb.com/ (Not Free)
But if you want to try.
Check out http://hdfvr.com . It is a commercial video recording solution developed in Flash. It can record to both .flv and .mp4 files and when used with Wowza and the Wowza Transcoder it can record MP4 files with AAC audio and H.264 video.
It works with all 3 media servers in the top answer: Adobe Media Server, Wowza Media Server and Red5 Media Server .
You had better to use a third party tool like red5 or wowza. I already implemented wowza with php.
you can chech http://www.wowza.com/streaming/record. It is easy to implement and video recording is too good and fast. But it is not free.
This can be a good helpful resource for further readers. Click here
Wowza seems a good solution for recordings considering price/documentation&reliability ratio. Many users reported broken videos when trying to record with Red5.
This solution mentioned in Wowza Streaming Engine forums works with latest Wowza server.
http://www.wowza.com/forums/showthread.php?35683-Webcam-Video-Recorder-for-PHP-scripts
It's free to download and try so it could be a great method to test your setup and start such project.
Can anyone help me to give me a path or instruction how can i stream video live by the help of PHP like live tv? I am willing not to use flash media server. If it is must to use it then which server is free and reliable?
Use ustream, justin.tv or a similar server to save yourself a ton of time/headaches/resources. These people have spent millions on their infrastructure and I suspect if you arent sure where to start, you should just use a freely available service.
I am developing an application where I need to record voice(for those who does not have a webcam so they can use only microphone to record voice) or video(those who have a a webcam - like laptop or external) files and save them on server, thereafter save the file name and logged in users id on database for later access.
I know I need to use some sort of flash app for this. But is there any free one which could server this purpose or even if there are paid ones which could serve this purpose that would be great. I tried google but may be I was not being able to go after the proper term or something, I could not succeed finding a proper solution for this.
Please, help me out!
You can do that simply using jRecorder, a jQuery plugin. You don't even need a Flash Media Server or RED server. JRecorder is same as jPlayer, you can use jQuery and HTML to design your recorder and you don't even need Flash or Action script knowledge for this.
jRecorder uses 1 pix hidden swf file which manages all the recording / previewing and sending the file data (wav file) to a URL you defined (Where you can write code in PHP or Java to receive a POST file)
It is quite simple and tidy.
You can download this Plugin from:
http://www.sajithmr.me/jrecorder-jquery
I have same feature in our latest project, the client want to have video recording from webcam and the video appear in the user's profile page.
For the server, we implement the RED5 server. It need a Java virtual machine in your hosting. You can read the detail requirement and installation instruction in the website.
To handle recording, we develop our own flash application, because the client request a custom interface to match with the overall website interface. I don't know the detail, since we outsource it to a fellow flash developer. Maybe you can see follow this thread, the development of flash recording by JeroenW.
To play recorded video, you can use any flash video player that support playing rtmp video source. You cannot play the recorded flv file in RED5 directly, since the file lack of metadata required by the player. Serving the recorded file as rtmp is done by RED5.
In addition to red5 there is Adobe's own Flash Media server that allows you to record audio/video straight to the server.
Or if you feel geeky you might be able to put together your own solution for this using a socket connection to the server and decoding the stream yourself on the server side. You should be able capture the audio/video locally into memory and then feed the byte stream up to your own server application.
There are Open Source solutions but you will need an own server to run them.
There is no way to run these things from shared hosting except if your provider is really nice, and ready to install the necessary software.
I asked the same question a few weeks back, check out the answers.
This question when googling "How to record audio php" comes up first so here for anyone from the future.
A simple way to record audio with flash and save it with PHP:
https://github.com/clouddueling/SimpleRecorder
Record audio, post audio data to your choice of url.
You could try recordmp3online.com which has an SDK. The nice thing about this one, is that it doesn't need a third party server(ala Red5), and supports mobile devices that don't have flash installed.
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?
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!
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
Stream Live video to the viewers
Record the streams from your cam or other video input devices to the server
Preview the recorded streams and files and thumbnail the frame which you would like to display for the video.
Upload the videos from your computer and convert them to FLV which can be streamed using Red5 .
Choose from any resolutions
Can be plugged to any script
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/
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.
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.
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....
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).
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.
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.