I'm using the RTMP module to push out an rtmp stream and i'm looking for ways I can dynamically pass in variables that can be used in the push stream.
For example:
application live {
live on;
record off;
#Youtube
push rtmp://a.rtmp.youtube.com/live2/$my_publish_key;
#Facebook
push rtmp://example.com/$my_publish_key_2;
}
Are there any tricks to be able to dynamically pass in variables that could be used to complete the urls?
Ideally these would be passed as $args
that could then be parsed out. Another idea would be if it's possible to set a variable in nginx from a value retrieved from a URL that could then be used.
Any ideas? Thanks!