启用指定视频流(适用于接入类型为 GB 的空间内的视频流)。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | StartStream | 要执行的操作,取值:StartStream。 |
Version | String | 是 | 2021-01-01 | API的版本,取值:2021-01-01。 |
StreamingIndex | Integer | 否 | 0 | 主子码流编号,取值及含义如下所示。
说明
|
StreamID | String | 否 | 524c804d-0149-4b58-8209-2f17f6xxxxxx | 视频流 ID,可通过调用 ListStreams 接口获。 |
Resolution | String | 否 | 3 | 分辨率编码(可参考 GB28181-2022 协议附录G中的定义),取值及含义如下所示。
说明
|
IgnoreAudio | String | 否 | 1 | 是否忽略音频,取值及含义如下所示。
|
FreshExpiredPull | String | 否 | 1 | 是否检查并刷新过期的 URL,需要先开启域名防盗链,取值及含义如下所示。
|
EnableAudioTranscode | String | 否 | 0 | 是否开启音频转码,开启后会将音频编码由 G.711 转为 AAC,取值及含义如下所示。
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
TransPullUrls | Array of String | {"rtmp://xxx/vhost/app/name"}"} | 转码流 |
ID | String | 4b9ee060-9fed-4c0e-aaa4-283b17xxxxxx | 启用成功的视频流 ID。 |
PullUrls | Array of String | ["rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001","http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv","http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8","http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp"] | 拉流地址。 |
POST https://open.volcengineapi.com?Action=StartStream&Version=2021-01-01&StreamID= { "StreamingIndex": 0, "Resolution": "4" }
{ "ResponseMetadata": { "RequestId": "202112081609140102120720962400088F", "Action": "StartStream", "Version": "2021-01-01", "Service": "aiotvideo", "Region": "cn-north-1" }, "Result": { "ID": "4b9ee060-9fed-4c0e-aaa4-283b17xxxxxx", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ] } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
---|---|---|
400 | ErrorStartStreamInvalidArgs | |
500 | InternalErrorStreamDB | |
500 | NotFoundSpace |