查询媒资详情
更新时间:2024-12-17
本接口用于查询媒资详细信息,结果包含媒资多种信息,包括:
- 媒资基础信息、源文件meta信息
- 转码输出结果
- 抽帧输出结果
- 字幕输出结果
- 审核输出结果
- 分析输出结果
请求结构
GET /v2/medias/{mediaId} HTTP/1.1
connection: keep-alive
host: vod.bj.baidubce.com
content-type: application/json
x-bce-request-id: <bce-request-id>
x-bce-date: <utc-date-string>
authorization: <bce-authorization-string>
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
mediaId | string | 是 | Path参数 | 媒资ID |
返回头域
除公共头域,无其它特殊头域。
返回参数
参考 MediaDetail 结构定义。
示例
查询指定媒资
请求内容
GET /v2/medias/mda-ek1knpprazeyv1gn HTTP/1.1
host: vod.bj.baidubce.com
accept: */*
connection: keep-alive
content-type: application/json
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
x-bce-date: 2024-03-24T13:08:44Z
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2024-03-24T13:08:44Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
返回内容
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
Cache-Control: no-cache
Date: Tue, 24 Mar 2024 13:08:44 GMT
Content-Type: application/json;charset=UTF-8
{
"mediaId": "mda-ek1knpprazeyv1gn",
"name": "demo",
"description": "",
"mediaType": "video",
"banStatus": "NORMAL",
"createTime": "2024-11-26T02:08:27Z",
"tags": [
"short_video"
],
"categoryId": "ek1knxq4san4617d8bux",
"source": {
"sourceType": "UPLOAD",
"sourceUrl": "https://vod.com/mda-ek1knpprazeyv1gn/_src/mda-ek1knpprazeyv1gn.mp4",
"coverUrl": "https://vod.com/mda-ek1knpprazeyv1gn/_output/ejisy3kbvfiwejzsemx9/mda-ek1knpprazeyv1gn00000000.jpg"
},
"sourceMetadata": {
"fileSizeInByte": 779449828,
"type": "video",
"container": "mov,mp4,m4a,3gp,3g2,mj2",
"durationInSecond": 139,
"durationInMillisecond": 138670,
"video": {
"codec": "h264",
"heightInPixel": 2160,
"widthInPixel": 3840,
"bitRateInBps": 44765683,
"frameRate": 60.0,
"dar": "16:9"
},
"audio": {
"codec": "aac",
"channels": 2,
"sampleRateInHz": 44100,
"bitRateInBps": 198048
},
"etag": "-8f8fe07c61ceca0b8f851c3f5b51a122"
},
"transcodeOutputs": [
{
"id": "ejisxn9bmajvi36kxwnz",
"url": "https://vod.com/mda-ek1knpprazeyv1gn/_output/ejisxn9bmajvi36kxwnz/mda-ek1knpprazeyv1gn.mp4",
"meta": {
"video": {
"durationInSeconds": 139,
"durationInMilliSeconds": 138680,
"sizeInKiloByte": 14428.041992,
"widthInPixel": 1920,
"heightInPixel": 1080,
"frameRate": 25,
"gopAlign": true,
"mp4MoovSize": 72258
},
"audio": {
"sampleRateInHz": 44100,
"channels": 2
}
}
},
{
"id": "ejisewhutbi59hf21wnd",
"url": "https://vod.com/mda-ek1knpprazeyv1gn/_output/ejisewhutbi59hf21wnd/mda-ek1knpprazeyv1gn.mp4",
"meta": {
"video": {
"durationInSeconds": 139,
"durationInMilliSeconds": 138700,
"sizeInKiloByte": 16769.270508,
"widthInPixel": 2048,
"heightInPixel": 1152,
"frameRate": 30,
"gopAlign": true,
"mp4MoovSize": 80539
},
"audio": {
"sampleRateInHz": 44100,
"channels": 2
}
}
},
{
"id": "ejis65at3r7a1ecpd3pg",
"url": "https://vod.com/mda-ek1knpprazeyv1gn/_output/ejis65at3r7a1ecpd3pg/mda-ek1knpprazeyv1gn.mp4",
"meta": {
"video": {
"durationInSeconds": 139,
"durationInMilliSeconds": 138700,
"sizeInKiloByte": 44282.558594,
"widthInPixel": 3840,
"heightInPixel": 2160,
"frameRate": 30,
"gopAlign": true,
"mp4MoovSize": 80475
},
"audio": {
"sampleRateInHz": 44100,
"channels": 2
}
}
}
],
"thumbnailOutputs": [
{
"id": "ejisy3kbvfiwejzsemx9",
"urls": [
"https://vod.com/mda-ek1knpprazeyv1gn/_output/ejisy3kbvfiwejzsemx9/mda-ek1knpprazeyv1gn00000000.jpg"
],
}
]
}
错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
错误码 | 错误信息 | HTTP状态码 | 描述 |
---|---|---|---|
MediaNotFound | Media not found with mda-xxx | 404 Not Found | 没有找到对应的媒资 |