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

查询直播流的转码数据

最近更新时间2023.10.12 17:40:10

首次发布时间2022.11.28 17:17:36

调用接口分页查询指定域名下所有流的转码总量,及每条流的流名、编码格式和转码时长等信息。

说明

该接口属于历史版本 API,我们计划于 2023 年 12 月 25 日停止对其进行维护,并于 2024 年 3 月 25 日下线文档,建议您使用新版查询直播流的转码数据接口。

注意事项

  • 请求频率:单用户请求频率限制为 100 次/秒
  • 数据延迟:数据延迟为 10 分钟

请求说明

  • 请求方式:POST
  • 请求地址:https://live.volcengineapi.com?Action=DescribeLiveBatchStreamTranscodeData&Version=2020-08-01

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringDescribeLiveBatchStreamTranscodeData接口名称。当前 API 的名称为 DescribeLiveBatchStreamTranscodeData
VersionString2020-08-01接口版本。当前 API 的版本为 2020-08-01

Body

参数类型是否必选示例值描述
DomainListArray of String["example.com", "example2.com"]域名列表。缺省情况下,表示当前账号下的所有域名
StartTimeString2022-11-10T00:00:00+08:00查询的起始时间,支持查询最近 93 天内的数据。RFC3339 格式的 UTC 时间,精度为 s,例如,2022-04-01T00:00:00+08:00
EndTimeString2022-11-11T00:00:00+08:00查询的结束时间,支持查询最近 93 天内的数据。RFC3339 格式的 UTC 时间,精度为 s,例如,2022-04-02T00:00:00+08:00
PageNumInteger1分页查询页码,默认值为 1,即查询第一页的信息
PageSizeInteger100单个分页中,查询的流数量。默认值为 1000,取值范围为 [100,1000]

返回参数

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

参数类型示例值描述
DomainListArray of String["example.com", "example2.com"]域名列表
StartTimeString2022-11-10T00:00:00+08:00查询的起始时间
EndTimeString2022-11-11T00:00:00+08:00查询的结束时间
TotalDurationFloat40查询结果中,所有流的转码总时长,单位为分钟
StreamInfoListArray of StreamInfoList-流维度的转码用量信息详情
PaginationObject of Pagination-分页信息

StreamInfoList

参数类型示例值描述
DomainStringexample.com域名
StreamStringexample_stream流名称
AppStringexample_app应用名称

VCodec

String

Normal_H264

视频编码格式,支持的取值和含义如下所示。

  • Normal_H264:H.264 标准转码;
  • Normal_H265:H.265 标准转码;
  • ByteHD_H264:H.264 极智超清;
  • ByteHD_H265:H.265 极智超清;
  • Audio:纯音频流。
DurationFloat30当前流的转码总时长,单位为分钟

Resolution

String

720P

当前流的分辨率,支持的取值如下所示。

  • 480P:640 × 480;
  • 720P:1280 × 720;
  • 1080P:1936 × 1088;
  • 2K:2560 × 1440;
  • 4K:3840 × 2160;
  • 0P:纯音频流。

Pagination

参数类型示例值描述
PageNumInteger1页数
PageSizeInteger1000当前页的大小
TotalCountInteger2总流数

示例

请求示例

POST https://live.volcengineapi.com?Action=DescribeLiveBatchStreamTranscodeData&Version=2020-08-01
{
   "StartTime": "2022-11-10T00:00:00+08:00",
   "EndTime": "2022-11-11T00:00:00+08:00",
}

返回示例

{
  "ResponseMetadata":{
    "RequestId": "201806041104200100100232280022D30",
    "Action": "DescribeLiveBatchStreamTranscodeData",
    "Version": "2020-08-01",
    "Service": "live",
    "Region": "cn-north-1"
  },
  "Result":{
    "StartTime": "2022-11-10T00:00:00+08:00",
    "EndTime": "2022-11-11T00:00:00+08:00",
    "TotalDuration": 40,
    "StreamInfoList": [
      {
        "Domain": "example.com"
        "Stream": "example_stream",
        "App": "example_app",
        "Resolution": "720P",
        "Duration": 20,
        "VCodec": "Normal_H264"
      },
      {
        "Domain": "example2.com"
        "Stream": "example_stream2",
        "App": "example_app",
        "Resolution": "720P",
        "Duration": 20,
        "VCodec": "Normal_H264"
      }
    ],
    "Pagination": {
        "PageNum":    1,
        "PageSize":   1000,
        "TotalCount": 2,
    }
}

错误码

访问公共错误码获取详细信息。