Skip to content

One NGINX RTMP Server for Multiple AVideo platforms

akhilleusuggo edited this page Dec 24, 2020 · 2 revisions

Configure NGINX-RTMP to Stream Multiple AVideo Platforms

I'm suposing that you already have an AVideo Platform Running , also that you have installed and configured a working NGINX-RTMP server . If not , follow the guides bellow :

https://github.com/WWBN/AVideo/wiki/Set-up-my-own-Stream-Server

https://github.com/WWBN/AVideo/wiki/How-to-install-LAMP,-FFMPEG-and-Git-on-a-fresh-Ubuntu-18.x-for-AVideo-Platform-version-4.x-or-newer

1. Understanding the NGINX-RTMP applications :

Rtmp-nginx does server with application . In our preconfigured configuration we have already used application named application live and application adaptive . So what we need are to create new application that nginx can handle , but we need to name them differently from other applications ; Example : application livedemo ( pick what ever name application you'd like )

2. Configuring our NGINX CONFIG FILE

What we need to do is make a copy of the default configuration that we had on application live , changing only name of the application :

sudo nano /usr/local/nginx/conf/nginx.conf

The livedemo it's a copy of the live application . Should look something like this :

image

Notes:

You have to change the hls_path and indicate it on your configuration . Create a new directory for the new hls_path application . Example: HLS/livedemo ; mkdir /HLS/livedemo

You need to change the root path of the rtmp if you're using hls_base_url

On the second application I'm using subdomain demo2 as my second AVideo platform , so you need to indicate where the call is gonna be made .

You need to restart NGINX /usr/local/nginx/sbin/nginx -s stop && /usr/local/nginx/sbin/nginx

3. Configure the Plugin Live

Now that we have configured the config file , we need to let the plugin know that the application name has changed ! To do that , we need to open our Live Plugin , and indicate the new application name ( only on the new site/sites ) . The default is live .

Make it look like this :

image

Now you should be ready to go ! 💯

4. For demo purposes :

I've created 10 different application , by names live,live1,live2,live3, ... live9 and this is how they look like on the rtmp stats :

image

This is powerful tool . With 10 application less then 300MB of RAM . You will be limited only by the bandwidth .

One NGINX-RTMP Server for Multiple AVideo platforms .

Clone this wiki locally