Since version 5.3, our API allows you to define an RTMP endpoint for our Live Streaming (a.k.a Restreamer) feature.
We implemented this as an Advanced Session Argument parameter named live_stream_endpoint (str)
, which you can set via PUT/POST session API calls.
See this section in our API documentation.
Note that the string value must include the “-f flv “ prefix, and that the quotation marks must be escaped. For example:
"-f flv \"rtmp://1.2.3.4:1935/live-ds2?doPublish=digitalsamba/mystream\""
Note: The above example uses the "ModuleSecureURLParams" Wowza authentication method. You may need to modify this to suit the needs of your RTMP endpoint. More info on Wowza authentication methods can be found below.
You can clear the live_stream_endpoint by using the same API call (POST session) and leaving the live_stream_endpoint empty (“”).
ModuleSecureURLParams
This is described in the following article:
https://www.wowza.com/docs/how-to-secure-publishing-from-an-rtmp-encoder-that-does-not-support-authentication-modulesecureurlparams
It requires a new application to be created with its own Application.xml file, and the connection string takes the form:"rtmp://1.2.3.4:1935/live-ds2?doPublish=digitalsamba/mystream"
Where,
new application name = live-ds1
application instance = mystream
<Property><Name>secureurlparams.publish</Name><Value>digitalsamba.doPublish</Value></Property>
File-based with URL query strings
This is described in the following article:
https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-url-query-strings-onconnectauthenticate2#comments
It uses query parameters in the RTMP URL to connect to server software., and the connection string takes the form:"rtmp://1.2.3.4:1935/live-ds1?digitalsamba&samba123/mystream"
Where,
new application name = live-ds1
application instance = mystream
text file named connect.password
, with the entry: digitalsamba samba123
Since both authentication methods work, we will leave it up to you whether you want to use ModuleSecureURLParams or File-based, but you will of course have to set the correct string syntax in the API call.