New on LowEndTalk? Please Register and read our Community Rules.
Live streaming script/solution?
Hi guys,
Does anyone know of a simple live streaming script/solution/app?
I'd like to setup a simple web page with a constant live stream from either a webcam or phone. Prefer something free that I don't have to rely on a 3rd party service if possible, but am considering anything at the moment.
Edit: Long story short, I'd like to stream from a phone to the web page 24/7, without a 3rd party service/subscription - bandwidth cost isn't a issue.
Cheers!
Thanked by 1muratai
Comments
There's a free android app called ip cam that does what you want, runs a web server on the android device and you can put the mjpeg stream on your site with some port forwarding etc
Have a look at restreamer. Never personally tried but seems like what your looking for.
Will have a look at those, cheers
Try Jitsi server as you be able to install on your server and be able to stream via app on phone or webcam.
Free: nginx-rtmp
Paid: Wowza
Nginx-rtmp can be your server, it can even work in a NAT tiny dirty-cheap server, depending only on the bandwidth you are going to use.
You can use the old flash protocol, or converting it on the fly to HLS/DASH or whatever you need, even rtsp or sldp.
As for android, there are a lot of options there for apps that can stream with the rtmp protocol.
For a server, there are other solutions, like nimble server with the free for 14 days wpanel (you use it to configure easily the server and then, you don't need it anymore).
All of those solutions are mostly designed for a p2p/video conferencing and, if configured to publish the stream to a webpage, can consume tons of bandwidth that home internet connections usually do not have.
OP has to determine how much bandwidth he expects to be used in peak hours via his webpage.
Also, if I was him, even with a 200/200 fiber DSL line, I would not broadcast publicly from my home, exposing in any case my own internet access and ip without the filtering from a DC... Broadcasting live publicly without a streaming server from your house, is exactly the same as hosting your own website/mailserver from your pc at home... Really not recommended...
What kind of stream will it be? Movies? A static view of your house?
this. I am hosting on a 128mb server, but i think can do with much less resource. as long as the input is only correct and no need to re-encode, you can convert to hls with very little resource.
if rtmp is ok, maybe crtmpserver is good also
Cheers for all replys.
I don't really know what I'm doing/how to go about it with live streaming hence why I'm asking here for recommendations or experience before I fully get into it.
Basically what I'm looking for is a setup where I can stream from a phone to a server in a DC then from the server to the viewers via a web page without a 3rd party service involved.
Phone to server 720p - won't use a hell of a lot of bandwidth as its only going to one place.
Server to viewers via webpage - expecting anywhere between 2000 - 10,000 viewers at once, I don't know how much bandwidth that will use as I have no experience with videos or live streaming, but bandwidth cost isn't an issue and I've got between 10-40Gbps dedicated per server if required, and multiple servers.
I'd like to start small and get the basic phone to server, server to viewers setup sorted first, then I can worry about scaling up with demand.
Cheers
Stream will be of someone walking around with a phone, doing their life
Make sure to let us know when they're swatted and eventually have everything taken away for being involved in an MLM.
Nginx-rtmp will be the best solution for you.
If you have access to so much resources of bandwidth, you won't have any issue. Just do the maths: 1,5Mbps will be enough for a 720p h264 stream. Multiply it with your expected peak (10,000 viewers) and you have 15Gbps of bandwidth needed (actually, about 17Gbps for the peaks - loss).
Calculate also the monthly bandwidth costs, if you will stream constantly: let's say you will have an average of 1,000 users 24/7. Then, you will need ~39TB of traffic DAILY, or 1,170TB per month! Almost 2 petabytes! This is huge! Are you sure you can cover the expenses of such bandwidth?
Of course, if you are going to stream only for some hours weekly or monthly and not 24/7, the costs will fall down dramatically. In that case, you can also spin hourly billed servers and vps and do a round-robin installation: you stream via phone to a main nginx-rtmp server and this server is restreaming to 10, 20 or more dedis and vps. You can setup a player html page to each of the servers, and using round-robin method to your site, split the traffic among the restreamers. This will be an extremely cheap scenario, comparing to a need for thousands of users 24/7.
Hope I helped.
I've just fired up a docker container with Restreamer and added 1 of my surveillance camera RTSP stream (2560x1600, 20 FPS) to test and it says it uses 6160Kb/sec (around 50Mbit) continuously. The CPU usage is around 6% (Intel Xeon E3-1246V3) and RAM Memory usage around 71 MB.
When I look at the network traffic, it's about 1200Kb/sec (10Mbit) for the connection to my surveillance camera + 1200Kb/sec (10Mbit) per user/viewer. This might give you some idea.
For that many viewers you need multiple servers. Look at icecast.
Kaltura and Red5 would be the free Wowza alternatives that come to my mind, although I have no experience with them?
Thanks for the reply.
Late reply as I've been away for work.
That is alot isn't it! But we can definelty cover the bandwidth/resource cost, huge amount of resources on tap.
Just looking for the solution
Cheers
Will do cheers
Thanks for the insight.
2k viewers will add up quick won't it!
Cheers
Yes. Especially the CPU and bandwidth usage will rise with more viewers at the same time.