Want to make your own streaming server so you can deliver live HTTP video to your website? Grab a VPS and strap in, because it's easier than you might think!
Affiliate links for DigitalOcean and Linode:
https://digitalocean.nots.co
https://linode.nots.co
Guide used as a reference for this video (not comprehensive): https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/
Currently-maintained NGINX RTMP module fork: https://github.com/sergey-dryabzhinsky/nginx-rtmp-module
Comments (log in to post)
posted
posted
properly installed nginx and msde config file.
root@vps-ec07fa56:/home/ubuntu# /usr/local/nginx/sbin/nginx -g 'daemon off;'
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
posted
posted
posted
posted
Third, how to work more than one channel at one time
posted
Hello, welcome. I have a live match streaming website and I have ubuntu 18.4 CPU 8 ram 32320 SSD, but when it is used on the site the number of simultaneous internet callers is no more than 1000.
But I want more traffic to my site
The broadcast is interrupted when I reach 1000 viewers online at one time, but have more than that number at one time and exceed 10,000 viewers at one time?
First of all, do I have to do load balance and can I do it this way? Is there an explanation to describe this method and how it works?
Second, what is installed on the backend servers, and what are its steps?
posted
I am having some issues with streaming though.
I am running Nginx on a seperate Ubuntu server and OBS on my computer. However, after entering the Server name in OBS (http://<server>/show)
OBS displays an error saying it failed to connect to the server. My Nginx is able to run and I am able to ssh to the server. I have also tried to telnet the Nginx server's 1935 port, but there it shows a failed connection. However, I have already opened all the necessary ports on my server.
Can the issue be caused from any closed ports? (eg. 1935)
Any help would be fantastic!
Thank you!
posted
First of all thank you so much for producing these videos. So much heartache avoided by clean and robust tutorials. A very welcome godsend.
I am struggling to make hls stream over https.
I have followed your previous video to the letter and have live streaming and restreaming over http.
I am also using Digital Ocean and LetsEncrypt. I have the certificates installed and from this video above I can see these in the appropriate folder. I have added, as per your instructions, the locations within nginx.conf.
I generally use "sudo systemctl restart nginx" with no errors; but have checked using your syntax and can see .m3u8 data being created.
I am a a complete loss and been at this https challenge for four days solid.
I'd be very grateful if you could shed some light or pointers to get this moving.
posted
UPDATE
**********
Watching your video again I've carefully went over the steps and the debugging protocols you use.
My server video is showing a 404 error but attributed to nginx 1.14, which I know is the Digital Ocean version, which I've never installed but somehow its in there. Note that my http stream works.
I ran your commands, found around 25 minutes in, to purge python-certbox-nginx:
root@200630-hls-restream-nohttps-s-1vcpu-2gb-lon1-01:~# sudo apt purge python-certbox-nginx
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python-certbox-nginx
root@200630-hls-restream-nohttps-s-1vcpu-2gb-lon1-01:~# sudo apt remove nginx*
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nginx-1.19.0
E: Couldn't find any package by glob 'nginx-1.19.0'
E: Couldn't find any package by regex 'nginx-1.19.0'
E: Unable to locate package nginx-rtmp-module
I can restart nginx and can send a stream to it, but again I have this nginx 1.14 404 error.
Your video goes too quick for me to see how to remove nginx1.14 and I'm now scared to touch anything :-D
I've also posted on this video's forum thread.
posted
Excellent tutorial! Quick question, still having an issue with sending the HLS data into my web site, the player keeps going into a loading loop after hitting 'play'. RTMP seems to be working, able to open the stream in VLC (rtmp://mydomain:8080/show/live.m3u8). Do I need to add anything under the http or HLS/application sections of the nginx.conf or could I be missing something else?
Ubuntu: 18.04
Nginx: 1.14 (hosting both www and rtmp)
VPS: AWS
Thanks in advance for your help and stay safe.
P.
posted
posted
posted
Nice tutorial.
Do you have some similar stream solution, for webrtc?
posted
I tell him I managed to implement my HLS server, and now that I buy a decoder to see the transmission that is sent to the server through RTMP, the decoder does not connect to the server since it only recognizes formatted addresses:
example:
transmission link: rtmp: //rtmp.mine.com.cn/live/0315
reproductor link: rtmp: //pay.mine.com.cn/live/0315
Do you think there was a solution?
posted
Why do you need to buy a decoder? ffmpeg is the encoder, NGINX is the transcoder, the web browser is the decoder. All major web browsers are currently able to play HLS, and even the ones that can't natively can do so through a video player like VideoJS.
"Reproductor" is not an English word, but I get the idea. However, your playback URL is not going to start with rtmp:, it's going to start with http: or https: (hence, why it's called HTTP Live Streaming) and it's going to end with .m3u8. You can play back the RTMP URL using a player that can decode RTMP, but the point of this video and the setup I demonstrated was to have NGINX decode it into HLS so clients can watch directly. Does that make sense? If not, then I'd need some more clarification on what you're trying to accomplish.