最近更新时间:2023.09.25 21:10:01
首次发布时间:2022.09.27 17:56:43
调用接口生成推流地址。
说明
该接口数据历史版本 API,我们计划于 2023 年 12 月 25 日停止对其进行维护,并于 2024 年 3 月 25 日下线文档,建议您使用新版生成推流地址接口。
请求频率:单用户请求频率限制为 25 次/秒。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GeneratePushURL | 接口名称。当前 API 的名称为 GeneratePushURL 。 |
Version | String | 是 | 2020-08-01 | 接口版本。当前 API 的版本为 2020-08-01 。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Vhost | String | 是 | push.example.com | 域名空间名称 |
App | String | 是 | live | 应用名称 |
Stream | String | 是 | stream001 | 流名称 |
ValidDuration | Integer | 否 |
| 有效时长,推流地址的有效时间,过期后需要重新生成。单位为秒,取值 ﹥0,缺省情况下表示 7 天。 说明 如果同时设置 |
ExpiredTime | String | 否 |
| 过期时间,推流地址的有效时间,过期后需要重新生成。RFC3339 格式的 UTC 时间,精度为秒,缺省情况下表示 7 天。 说明 如果同时设置 |
Domain | String | 否 | 推流域名名称,需要推流地址的域名,不填返回Vhost下所有推流域名生成的地址 |
下表仅列出本接口特有的返回参数。更多信息请见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
PushURLList | Array of String | ["rtmp://push.example.com/live/stream001"] | RTMP 推流地址 |
PushURLListDetail | Array of PushURLListDetail | - | 推流地址详情 |
TsOverSrtURLList | Array of String |
| TS over SRT 推流地址 |
RtmpOverSrtURLList | Array of String | ["rtmp://push.example.com:1999/live/stream001"] | RTMP over SRT 推流地址 |
RtmURLList | Array of String | ["http://push.example.com/live/stream001.sdp"] | RTM 推流地址 |
WebTransportURLList | Array of String | ["https://push.example.com/live/stream001"] | 网络传输推流地址 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
URL | String | rtmp://live.push.example.com/live/stream001 | 推流地址 |
DomainApp | String | rtmp://push.example.com/live/ | OBS 推流地址,例如,rtmp://push.example.com/live/ |
StreamSign | String | stream001 | OBS 推流名称,例如,streamname1?volcTime=1675652376&volcSecret=c57d247c2f19b395b6ec9b182******7 |
POST https://live.volcengineapi.com?Action=GeneratePushURL&Version=2020-08-01 { "Vhost": "push.example.com", "Domain": "push.example.com", "App": "live", "Stream": "stream001", "ExpiredTime": "2022-08-19T16:07:25+08:00" }
{ "ResponseMetadata":{ "RequestId":"2022081915573801022524312506B8B2EA", "Action":"GeneratePushURL", "Version":"2020-08-01", "Service":"live", "Region": "cn-north-1" }, "Result": { "PushURLList": [ "rtmp://example.org/live/test1" ], "PushURLListDetail": [ { "DomainApp": "rtmp://example.org/live/", "StreamSign": "test1", "URL": "rtmp://example.org/live/test1" } ], "RtmURLList": [ "http://example.org/live/test1.sdp" ], "RtmpOverSrtURLList": [ "rtmp://example.org:1999/live/test1" ], "TsOverSrtURLList": [ "srt://example.org:9000?streamid=#!::h=example.org,r=live/test1,m=publish", "WebTransportURLList": ["https://example.org/live/test1"] ] } }
访问公共错误码获取详细信息。