文档中心

转码结果回调用户

POST 回调接口

视频云提供HTTP POST的回调内容如下:

  • avop、avlogo、avm3u8、avsample、avsnapshot 任务回调内容格式

{
    //任务id type:string
    "taskid": "92e3745751aee5662f9f06ff3f03076920160914",
    //成功:3 失败: 4 type:int
    "status": 3,
    //任务类型:与创建请求的任务类型一致,包含avop、avm3u8、avlogo、avinfo等
    "type": "avop",
    //兼容ks3老用户需求
    "itmes": [
        {
            "cmd": "tag=avop|tag=saveas&bucket=wangshuai9&object=bTN1OC90ZXN0LzEubXA",
            "desc": "success",
            "keys": [
                "m3u8/test/shouyin1.mp4"
            ],
            "code": 3
        }
    ],
    //视频云离线转码返回信息
    "details": {
        //成功:0 失败:其他 type:int
        "errnum": 0,
        //bucket地址 type:string
        "bucket": "wangshuai9",
        "items": [
            {
                //文件存储地址 type:string
                "dstpath": "m3u8/test/shouyin1.mp4"
            }
        ]
    }
}
  • avinfo 任务回调格式

{
    "taskid":"0c33c9c372ff87fe197cb0dcf236e18d20161223",
    "status":3,
    "type":"avinfo",
    "itmes":[
        {
            "cmd":"tag=avinfo",
            "desc":"success",
            "keys":[
                ""
            ],
            "code":3
        }
    ],
    "details":{
        "errnum":0,
        "bucket":"",
        "items":[
            {
                "dstpath":"",
                "metainfo":"{
                    "metadata":{

                    },
                    "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
                    }
                }"
            }
        ]
    }
}

GET 回调接口

目前不提供