Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic proxy pass #254

Open
dcarrion87 opened this issue Dec 10, 2023 · 1 comment
Open

Dynamic proxy pass #254

dcarrion87 opened this issue Dec 10, 2023 · 1 comment

Comments

@dcarrion87
Copy link

dcarrion87 commented Dec 10, 2023

Looking to use this for multiple source / destination.

RTMP clients would come into this server and on_connect will look up and rewrite to the "live" application.

I'd expect there to only be one "live" application and be able to dynamically proxy pass to many different backends based on the value in the original /<stream_key>.

Is this possible without setting up unique application handlers?

I'd rather not have to use notify_send_redirect and have the client needing to support this.

@dcarrion87 dcarrion87 changed the title Possible to dynamic proxy pass Dynamic proxy pass Dec 10, 2023
@golyalpha
Copy link

You'd do this in the on_publish directive:

HTTP 3xx redirects RTMP to another stream whose name is taken from Location HTTP response header. If new stream name is started with rtmp:// then remote relay is created instead. Relays require that IP address is specified instead of domain name and only work with nginx versions greater than 1.3.10. See also notify_relay_redirect.

In other words, you can send rtmp://ip/app/key from the on_publish handler to dynamically create a remote relay rather than a redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants