nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Multiple servers or applications?

Open ChristofferSthlm opened this issue 4 years ago • 4 comments

Throwing out a question here:

Is it possible to have multiple rtmp servers or applications to make the streaming workflow easier? I have the need to re-stream to different groups of multiple locations for different organisations. It would be so easy to just call the servers or applications when I switch between the organisations instead of having to rewrite the code in the nginx.conf all the time. :)

Something like:

 #push RTMP stream set 1 for organisation 1
server {
    listen 1935;
    application myapp1 {
    push rtmp://example1a
    push rtmp://example 1b 

    }
}
 #push RTMP stream set 2 for organisation 2
server {
    listen 1935;
    application myapp2 {
    push rtmp://example2a
    push rtmp://example 2b 

    }
}

Any wisdom on this?

ChristofferSthlm avatar Dec 03 '20 08:12 ChristofferSthlm

You can create multiple apps inside same server block

rtmp {
  server {
    listen 1935;
    listen [::]:1935 ipv6only=on;

    application myapp1 {
        live on;
    }
    application myapp2 {
        live on;
    }
  }
}

cmnajs avatar Dec 21 '20 23:12 cmnajs

@cmnajs hi what if i have 2 application, and then i want to make it dynamic like below, how can i set streamKey from http callback

rtmp {
  server {
    listen 1935;
    listen [::]:1935 ipv6only=on;

    application facebook{
        live on;
        push http://facebook/{streamKey}
    }
    application youtube {
        live on;
        push http://youtube/{streamKey}
    }
  }
}

Newt6611 avatar Jun 30 '22 01:06 Newt6611

Hi @cmnajs , is it possible to add an application dynamically without restarting the Nginx?

what if i have 2 application, and then i want to make it dynamic like below, how can i set streamKey from http callback

Hi @Newt6611, did you find any solution?

yakupbeyoglu avatar Jan 01 '23 21:01 yakupbeyoglu

@Newt6611 - Did you get the answer ? Please let me know I am also looking for the similar solution .

knvchaitanya1990 avatar Oct 31 '23 05:10 knvchaitanya1990