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

how to push live stream to another server with different appname, stream name and query params ?

Open alotela opened this issue 13 years ago • 2 comments

Hi,

I'm trying to push a stream from my server to another server, when the user starts publishing. The stream name is different for each user, and I need to had a key (per user) in the query string of the other server's rtmp url.

rtmp://myserver.com/myapp/streamname1

should be (live) pushed to

rtmp://otherserver.com/otherapp/user_otherstream?key=user_key_value

is there any way to do this? I tried to look at on_publish callback with 303 return code, but it does not seem to be the good solution. I thought about sending all new params into the query string, but can I catch them in my config file ?

something like that : rtmp://myserver.com/myapp/streamname1?to_app=otherapp&to_stream=otherstream&key=key_value => rtmp://otherserver.com/$to_app/$to_stream?key=$key

thank you.

alotela avatar Sep 05 '13 17:09 alotela

Push directive does not support arguments. You can use exec ffmpeg instead.

arut avatar Sep 12 '13 04:09 arut

ok. That's what i use since yesterday.

Thank you.

alotela avatar Sep 12 '13 06:09 alotela