This topic describes RTMP ingest URLs and their signature method.
You must sign an ingest URL only when the bucket access control list (ACL) is not public-read-write. The signing method is similar to that for OSS URLs.
RTMP ingest URL
The RTMP ingest URL is in the format rtmp://${bucket}.${host}/live/${channel}?${params}. Example: rtmp://examplebucket.oss-cn-hangzhou.aliyuncs.com/live/test-channel.
bucket: The bucket name. Example:examplebucket. For more information about bucket naming conventions, see Bucket.host: The endpoint of the region. Example:oss-cn-hangzhou.aliyuncs.com. For more information about endpoints, see Regions and endpoints.live: The application name for the RTMP protocol. In OSS, this value is fixed to
live.channel: The channel name. Example:test-channel. For more information about channel naming conventions, see PutLiveChannel.params: The stream ingest parameters. The format is the same as that of a query string in an HTTP request. Example:varA=valueA&varB=valueB.
RTMP ingest URL parameters
The following table describes the parameters in RTMP ingest URLs.
Name | Description |
playlistName | Specifies the name of the generated M3U8 file. Note The |
Signature method of RTMP ingest URLs
A signed ingest URL is in the format rtmp://${bucket}.${host}/live/${channel}?OSSAccessKeyId=xxx&Expires=yyy&Signature=zzz&${params}.
The following table describes the parameters in signed RTMP ingest URLs.
Parameter Name | Description |
OSSAccessKeyId | The same as the AccessKeyId for signing OSS HTTP requests. |
Expires | The UNIX timestamp, in seconds. |
Signature | The signature string. |
params | Other parameters. All parameters must be signed. |
The signature is calculated using the following method:
base64(hmac-sha1(AccessKeySecret,
+ Expires + "\n"
+ CanonicalizedParams
+ CanonicalizedResource))The following table describes the parameters involved in signature calculation.
Name | Description |
CanonicalizedParams | All parameters concatenated in lexicographic order of the parameter keys. The format is Note
|
CanonicalizedResource | The format is |