You need to enable JavaScript to run this app.
导航

查看视频流

最近更新时间2024.05.16 14:53:08

首次发布时间2021.11.25 17:21:46

查询指定视频流的详细信息。

请求说明

  • 请求方式:GET
  • 请求地址:https://open.volcengineapi.com?Action=GetStream&Version=2021-01-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数类型是否必选示例值描述
ActionStringGetStream接口名称。当前 API 的名称为 GetStream
VersionString2021-01-01接口版本。当前 API 的版本为 2021-01-01
StreamIDString4b9ee060-9fed-4c0e-aaa4-283b17xxxxxx筛选条件,视频流 ID,可通过调用 ListStreams 接口获取
StreamNameString筛选条件,视频流名称,
FreshExpiredPullString1是否刷新过期的拉流地址,如果设置为1,会判断拉流地址是否过期(拉流域名开启防盗链);如果过期,会刷新拉流地址
FreshExpiredPushString0是否刷新过期的推流流地址,如果设置为1,会判断推流地址是否过期(推流域名开启防盗链);如果过期,会刷新推流地址

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数类型示例值描述
SpaceIDString517ff7ec-7700-4862-b1e7-7967a4xxxxxx视频流所属空间 ID
SIPIDString34020000002000xxxxxxSIP 服务器 ID
StreamNameString34020033991320xxxxxx_34020033991320384963视频流名称
StreamIDString4b9ee060-9fed-4c0e-aaa4-283b17xxxxxx视频流 ID

SpaceAccessType

String

gb28181

视频流所属空间类型:

  • rtmp
  • gb28181
  • rtmp-forward

Status

String

online

视频流状态:

  • online:在线
  • offline:离线
  • failed:失败
  • pulling:拉流中
  • init:初始化
DeviceIDString0a32c128-c89c-4f39-aa60-66e5f1xxxxxx视频流所属设备 ID,RTMP 类型为空
DeviceNSIDString34020033991320xxxxxx视频流所属设备国标 ID,RTMP 类型为空
ChannelIDString34020033991320xxxxxx视频流所属设备通道 ID,RTMP 类型为空

StreamingType

String

main_stream

视频流类型:

  • main_stream:主码流
  • sub_stream:子码流
DescriptionStringchannel: 34020033991320xxxxxx@device: 34020033991320xxxxxx视频流描述
ScreenshotObject of Template-为视频流配置的截图模板,参考以下 Template 数据结构说明
RecordObject of Template-为视频流配置的录制模板,参考以下 Template 数据结构说明
AIObject of Template-为视频流配置的 AI 模板,参考以下 Template 数据结构说明
RecentPushTsString2021-11-30T17:07:35+08:00最近推流时间
CreatedAtString2023-06-13T16:20:28+08:00视频流创建时间
UpdatedAtString2023-06-13T16:22:28+08:00视频流更新时间
RTMPushUrlStringhttps://xxx-push.xx/xxx.sdp?Time=123&Secret=xxx推流地址
PullUrlsArray of String["rtmp://m8v21xhnuzxxxxxx.pull.xxx.com/xxx/xxx_xxx_xxx","https://prcldt8wqxxxxxx.pull.xxx.com/xxx.flv","https://prcldt8wqxxxxxx.pull.xxx.com/xxx.m3u8"]拉流地址
TransPullUrlsJSON Map-转封装拉流地址

RtpTransportTcp

Boolean

true

GB空间使用,流媒体传输是否使用 TCP 协议:

  • true:是
  • false:否

Resolution

String

6

GB空间使用,通道支持的分辨率列表:

  • 1(QCIF - 176x144)
  • 2(CIF - 320x288)
  • 3(4CIF - 704x576)
  • 4(D1 - 720x576)
  • 5(720p)
  • 6(1080p/i)
  • 其他(自定义宽高,如19201080等,需设备支持)
PullSourceString拉流空间使用,拉流的拉流地址

Template

参数类型示例值描述
TemplateIDStringonline-record-1022模板 ID(未配置时为空)
TemplateNameString1f5704dc-8d31-4547-9534-1ac40bxxxxxx模板名称(未配置时为空)

请求示例

GET https://open.volcengineapi.com?Action=GetStream&Version=2021-01-01&StreamID=4b9ee060-9fed-4c0e-aaa4-283b17xxxxxx&StreamName=&FreshExpiredPull=1

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202405161415323611B09E71B9FF693CA5",
    "Action": "GetStream",
    "Version": "2021-01-01",
    "Service": "aiotvideo",
    "Region": "cn-north-1"
  },
  "Result": {
    "SpaceID": "af991768-856e-4c99-94c0-e8476dcb2896",
    "StreamName": "zxvxzbg",
    "StreamID": "2b49c3b4-31c6-4f48-b3f7-def75c198949",
    "SpaceAccessType": "rtmp",
    "Status": "offline",
    "StreamingType": "main_stream",
    "Screenshot": {
      "TemplateName": "",
      "TemplateID": "",
      "ApplyAll": null
    },
    "Record": {
      "TemplateName": "",
      "TemplateID": "",
      "ApplyAll": null
    },
    "AI": {
      "TemplateName": "",
      "TemplateID": "",
      "ApplyAll": null
    },
    "CreatedAt": "2024-04-25T17:44:27+08:00",
    "UpdatedAt": "2024-05-16T14:13:06+08:00",
    "PushUrl": "rtmp://lk9xvv3rvwgin59l.fcdn-boe-push.byted.org/kiizphpla00yfzmg/zxvxzbg?volcSecret=e0de2b3b67f392b23f44c7ab9841fa34&volcTime=1716444786",
    "RTMPushUrl": "https://lk9xvv3rvwgin59l.fcdn-boe-push.byted.org/kiizphpla00yfzmg/zxvxzbg.sdp?volcSecret=e0de2b3b67f392b23f44c7ab9841fa34&volcTime=1716444786",
    "PullUrls": [
      "rtmp://lk9xvv3rvwgin59l.fcdn-boe-pull.byted.org/kiizphpla00yfzmg/zxvxzbg",
      "https://lk9xvv3rvwgin59l.fcdn-boe-pull.byted.org/kiizphpla00yfzmg/zxvxzbg.flv",
      "https://lk9xvv3rvwgin59l.fcdn-boe-pull.byted.org/kiizphpla00yfzmg/zxvxzbg/index.m3u8",
      "https://lk9xvv3rvwgin59l.fcdn-boe-pull.byted.org/kiizphpla00yfzmg/zxvxzbg.sdp"
    ],
    "RecentPushTs": "2024-04-29T14:21:19+08:00",
    "Logs": null
  }
}

错误码

您可访问公共错误码,获取更多错误码信息。