How to use XSPLIT and FFMPEG for Wowza 4 with a working RTMP-Authentication (FYI)

After now dealing a few hours with this common problem, here is my working solution for the actual wowza streaming engine 4.

Unfortunately module “moduleOnConnectAuthenticate2” from the Wowza Module Collection (Version 4) actually does not work with both applications (XSPLIT, FFMPEG).

Details for this module can be found here: https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-url-query-strings-onconnectauthenticate2

The neccessary information for a working solution is somehow already described here:

See: How-to-secure-publishing-from-an-RTMP-encoder-that-does-not-support-authentication-(ModuleSecureURLParams)

Here is my ABSTRACT:

1. Turn off RTMP-Authentication for the desired application (e.g. “xsplit”)

2. Add the module "ModuleSecureURLParams"

<Module> 
  <Name>ModuleSecureURLParams</Name> 
  <Description>ModuleSecureURLParams</Description> 
  <Class>[B]com.wowza.wms.security.ModuleSecureURLParams[/B]</Class> 
</Module>

Note: Adding a new module might need advanced administrator properties

See https://www.wowza.com/docs/how-to-get-started-as-a-wowza-streaming-engine-manager-administrator

3. Add a private “URL-Token” (~password) for all RTMP publishers

<Property> 
  <Name>secureurlparams.publish</Name> 
  <Value>[B]12345.doPublish[/B]</Value> 
</Property>

That’s it !

Sample settings in XSPLIT Custom RTMP-Channel properties (Version 1.3.1405.2901):

  RTMP URL:       rtmp://<wowza ip>:1935/xsplit[B]?doPublish=12345[/B]
  Stream Name:  mystream
  User Agent:      FMLE/3.0
  

(Note: First use “Test bandwith” option here to check valid RMTP Login)

FFMPEG command line mit RTMP-Authentication:

ffmpeg -i  <input source> ...  -f  flv  "rtmp://<wowza ip>:1935/xsplit[B]?doPublish=12345[/B]/mystream"

(ffmpeg version N-66232-g5e3da25)

NOTE:

  • Actualy you cannot combine this URL Secure-Token method and the standard RTMP-Authentication.

  • Remember that the whole RTMP-URL is not encrypted while transmitted over the Network to the Wowza Server.

Regards,

:rolleyes:

Hi,

Thank you for this useful contribution to the ModuleSecureURLParams & ModuleOnConnectAuthenticate2 workflow. I’m sure this will come in useful for others. We shall examine this and see if it’s worthy of contributing to an existing or new article.

Kind regards,

Paul