This topic describes RTMP ingest URLs and their signature method.

Note You must add a signature to a RTMP ingest URL only when the bucket ACL is not set to public-read-write. The signature method of RTMP ingest URLs is similar to that of OSS URLs.
A RTMP ingest URL must be in rtmp://${bucket}.${host}/live/${channel}? ${params} format. Example: rtmp://your-bucket.oss-cn-hangzhou.aliyuncs.com/live/test-channel.
  • live: the name of the app for RTMP. OSS uses "live" for RTMP ingest.
  • params: the ingest parameter. Its format must be the same as the query string of an HTTP request. Example: varA=valueA&varB=valueB.

RTMP ingest URL parameters

The following table describes the parameters in RTMP ingest URLs.

Parameter Description
playlistName Specifies the name of the generated M3U8 file. The value of this parameter overwrites the value specified in the LiveChannel settings.
Note The generated M3U8 file will still contain the ${channel_name}/ prefix.

Signature method of RTMP ingest URLs

A signed RTMP ingest URL is in rtmp://${bucket}.${host}/live/${channel}? OSSAccessKeyId=xxx&Expires=yyy&Signature=zzz&${params} format.

The following table describes the parameters in signed RTMP ingest URLs.

Parameter Description
OSSAccessKeyId Assumes the same role as the AccessKeyId in the signed HTTP request.
Expires The expiration time of the URL. The timestamp follows the UNIX time format.
Signature The signature string.
params Other parameters.
Note All parameters must be included in the signature.

The signature calculation rules are as follows:

base64(hmac-sha1(AccessKeySecret,
    + Expires + "\n"
    + CanonicalizedParams
    + CanonicalizedResource))

The following table describes the parameters involved in the signature calculation.

Parameter Description
CanonicalizedResource The value of this parameter is in /BucketName/ChannelName format.
CanonicalizedParams The canonicalized query string created by arranging the parameter keys in alphabetical order. Parameters must be in key:value\n format.
Note
  • The value of this parameter is null if there are no parameters.
  • SecurityToken, OSSAccessKeyId, Expire, and Signature are not used for creating a canonicalized query string.
  • Every parameter key is used in the string only once.