arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.46k stars 3.51k forks source link

how to made rtmp redirect #631

Open lcplj123 opened 9 years ago

lcplj123 commented 9 years ago

Well,i hava some machines,A and B,C,D,... I want machine A to be a loadbalancer,so when a connection CONN comes in, machine A should redirect the rtmp connection to another machine,such as B, and the CONN should have no relationship between CONN and A. But now, i find a phenomenon that CONN connect A with 1935 port,and A connect B with 1935 port. This is not what i want. The conf belows: http { ... location /remote_redirect {

no domain name here, only ip

    rewrite ^.*$ rtmp://192.168.1.123/someapp/somename? permanent;
}
...

}

rtmp { ...

application myapp {
    live on;
    # stream will be pulled from remote location
    # requires nginx >= 1.3.10
    on_play http://localhost:8080/remote_redirect;
}
...

}

Levvy055 commented 9 years ago

try to write 'push your_url;' on A with url to B

sergey-dryabzhinsky commented 9 years ago

This issue is connected with #645.

The simple answer is 'no'. nginx-rtmp do 'pass-through' itself stream instead of 'redirect' to another server.

But there is some posiblity of redirect. If client that do pushing stream is support 'redirect-reject' NetConnection event. More info in issue #645

lcplj123 commented 9 years ago

thanks。