-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Change stream name after on_publish call #713
Comments
Any ideas? |
you could rewrite rtmp URL or stream name by set on_publish . |
on_publish notify event allows you to change stream name by setting Location header to desired value in response. |
Do I need to return a 300 for it to redirect properly? Also do I need to have separate app or can it be the same app with just new stream name? |
@zerogee00 you are right. |
Any 3xx code should work. You don't need separate app. You can handle it in your script and if you return 200 code without Location header nginx won't change name, so you can change name only for some publishers. |
Thanks everybody - this worked great I am changing the name by setting location in the header and returning 300. |
I have the same problem, but it doesn't change the directory name it remains the same. |
I have a system setup where publishers get a streamkey (lets say abc123) from my api and are able to stream to an app named 'stream' where it creates HLS playlist and TS files. (abc123.m3u8, etc) They point their encoders to rtmp://streaming.server.com/stream/abc123
Then via on_publish it calls an 'authentication application' that checks if that streamkey is in our api and then returns 200 if it is and 4xx if it isn't. It can also look up a more public key (xyz789) at this point (but how would I return that key to the rtmp module?)
What I then need to be able to do it somehow change the stream name to that public key and have the files named xyz789.m3u8 etc so that only the publisher and not any clients know the original streamkey and can watch the stream via http://streaming.server.com/stream*/xyz789.m3u8
*or another redirected app
The text was updated successfully, but these errors were encountered: