There are actually a few different authentication mechanisms for
RTMP that have been used over the years.
1) Adobe authentication: This is probably the most common form of
RTMP authentication which was originally added to Adobe's Flash Media Live Encoder (FMLE) as well as their Flash Media Server (FMS). This authentication mechanism is similar to HTTP Digest authentication and involves using a server-generated nonce string and password hash that are exchanged between the client and server during the initial
RTMP connection.
ffmpeg uses the following URL format when supplying a username and password for Adobe-style
RTMP authentication
- Code: Select all
rtmp://[username:password@]server[:port][/app][/instance][/playpath]
It sounds like the ATEM Mini XML configuration file may be compatible with this URL format as well, but many other software and hardware encoders include username and password fields that are separate from the URL. This is because these pieces of authentication information are not actually sent to the server in the URL, but instead use the digest approach mentioned above. The URL format used by ffmpeg is just for convenience (and earlier versions of ffmpeg used separate pubUser and pubPasswd arguments.
Akamai, Wowza, and many of the other popular streaming servers and CDNs use Adobe-style authentication by default, but it is not the only option for
RTMP authentication.
2) URL query parameters: The second
RTMP authentication mechanism in widespread use involves sending the username, password, or other authentication information as parameters in the query portion of the URL. These are similar in format to HTTP URL query parameters, but applied to
RTMP URLs.
The names of the authentication parameters may vary depending on the streaming server used. The
rtmpauth=username:password format seems to be used by Nimble Streamer, while some other streaming servers use different URL query parameter formats. When using URL parameter authentication In Wowza, for example, it is common to use unnamed parameters in the query string (rather than the more traditional key=value pair):
- Code: Select all
rtmp://[wowza-ip-address]:1935/live/?username&password
Since there is no fixed format for this style of authentication, the streaming server or CDN should specify the query parameter URL format that is expected.
Some form of encryption (such as RTMPS or RTMPE) is typically used in combination with URL query parameter authentication, because otherwise the username and password information would be sent in plaintext. This differs from Adobe authentication which uses a digest to avoid sending the password directly.