查询META信息接口(GetTaskMetaInfo)

最近更新时间:2020-07-10 20:04:35

功能描述:

根据任务ID查询单个任务META信息,或根据时间范围查询任务META信息列表,转码模板类型必须为avinfo才可通过GetTaskMetaInfo查询,主要用于查询转码后文件的meta信息

注意:可以查询最近90天的任务数据

请求方式:

GET

请求参数:

参数名 类型 是否必须 描述
TaskID string 任务ID,若使用该参数查询,则其他参数忽略
StartDate int 开始时间,默认为当前月的第一天;格式:20160919
EndDate int 截至时间,默认为开始时间加30天;若大于当前时间,则默认为当前时间;格式:20160930
Marker int 请求起始游标,默认为0
Limit int 单次请求的记录数,默认为100,最大值为100

返回参数:

参数名 类型 是否必须 描述
ErrNum int 错误码,0:成功;非0:失败
ErrMsg string 描述本次请求错误的原因
Count int 本次返回记录条数
Total int 该时间区间内总记录条数
MetaList json array META信息列表

MetaList说明

参数名 类型 是否必须 描述
TaskID string 任务ID
MetaInfo string 源文件信息,是序列化的json串。定义详见“用户回调说明->Details->items->metainfo字段”

请求示例:


GET /?Action=GetTaskMetaInfo

&Version=2017-01-01

&X-Amz-Algorithm=AWS4-HMAC-SHA256

&X-Amz-Date=20170519T085908Z

&X-Amz-Credential=xxxxx

&X-Amz-SignedHeaders=xxxxx

&X-Amz-Signature=xxxxx

&StartDate=20160918

&EndDate=20160919

&Marker=0

&Limit=1000 HTTP/1.1

Host: kvs.cn-beijing-6.api.ksyun.com

Accept: application/json

返回示例:


HTTP/1.1 200 OK

Server: ksyun-open-platform

Date: Fri, 12 May 2017 08:01:06 GMT

Content-Type: application/json;charset=UTF-8

Transfer-Encoding: chunked

{

    "StartDate":"20160929",

    "EndDate":"20160930",

    "Marker":0,

    "Count":1,

    "Total":6,

    "MetaList":[

        {

            "TaskID":"c3697fdd9c4c1240c0e5f29b7a63cba820160929",

            "MetaInfo":"{

                "streams":[

                    {

                        "codec_name":"aac",

                        "codec_long_name":"AAC (Advanced Audio Coding)",

                        "profile":"LC",

                        "codec_type":"audio",

                        "codec_time_base":"1/48000",

                        "codec_tag_string":"mp4a",

                        "codec_tag":"0x6134706d",

                        "r_frame_rate":"0/0",

                        "avg_frame_rate":"0/0",

                        "time_base":"1/48000",

                        "start_time":"0.000000",

                        "duration_ts":61673448,

                        "duration":"1284.863500",

                        "bit_rate":"47325",

                        "nb_frames":"60228",

                        "sample_fmt":"fltp",

                        "sample_rate":"48000",

                        "channels":2,

                        "channel_layout":"stereo"

                    },

                    {

                        "index":1,

                        "codec_name":"h264",

                        "codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",

                        "profile":"High",

                        "codec_type":"video",

                        "codec_time_base":"642153/15575000",

                        "codec_tag_string":"avc1",

                        "codec_tag":"0x31637661",

                        "r_frame_rate":"13/1",

                        "avg_frame_rate":"7787500/642153",

                        "time_base":"1/16000",

                        "start_pts":10176,

                        "start_time":"0.636000",

                        "duration_ts":20548896,

                        "duration":"1284.306000",

                        "bit_rate":"781679",

                        "nb_frames":"15575",

                        "width":500,

                        "height":600,

                        "coded_width":512,

                        "coded_height":608,

                        "has_b_frames":2,

                        "sample_aspect_ratio":"0:1",

                        "display_aspect_ratio":"0:1",

                        "pix_fmt":"yuv420p",

                        "level":22,

                        "chroma_location":"left",

                        "refs":1,

                        "is_avc":"true",

                        "bits_per_raw_sample":"8"

                    }

                ],

                "format":{

                    "nb_streams":2,

                    "format_name":"mov,mp4,m4a,3gp,3g2,mj2",

                    "format_long_name":"QuickTime / MOV",

                    "duration":"1284.864000",

                    "size":"133778683",

                    "bit_rate":"832951",

                    "probe_score":100

                }

            }",

            "CreateTime":"2016-09-29 18:20:29"

        }

    ],

    "ErrNum":0,

    "ErrMsg":"success"

}

金山云,开启您的云计算之旅

免费注册