视频点播 VOD-示例3:获取媒资详情:操作步骤
时间:2024-12-04 15:54:23
操作步骤
- 获取用户Token,用于调用点播接口时进行认证鉴权。
详细信息请参见构造请求。以“华北-北京四”为示例,若您需要调用其它区域的点播接口,请替换成对应区域的 IAM 终端节点。
POST https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens Content-Type: application/json { "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", "password": "password", "domain": { "name": "domainname" } } } }, "scope": { "project": { "name": "projectname" } } } }
如图1所示,红框中的信息为获取用户Token。 - 调用查询媒资信息接口,查询媒资详情信息。
- 选择GET请求方法并输入URI。
https://{endpoint}/v1.0/{project_id}/asset/details?asset_id=41cff636d5b12a51e7eb2838bbf45201&categories=base_info,transcode_info&thumbnail_info,review_info
- 请求消息头中增加“X-Auth-Token”,值设置为步骤1中获取的用户Token。
- 请求响应成功后,返回媒资详情信息。
{ "asset_info_array" : [ { "asset_id" : "652c1e4085afeb22fdc256c6757d751b", "status" : "PUBLISHED", "description" : "Asset meta is published", "base_info" : { "title" : "okFLV.flv", "video_name" : "okFLV.flv", "description" : null, "category_id" : -1, "category_name" : "其他", "create_time" : "20190704144303", "last_modified" : "20190704144303", "video_type" : "FLV", "tags" : null, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 244, "video_size" : 13682041, "width" : 512, "hight" : 288, "bit_rate" : 448, "frame_rate" : 30, "quality" : null }, "video_url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/45c2493abe68de3dac7e98b0dadcf8ce.flv", "sign_url" : "", "cover_info_array" : [ { "cover_url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/cover/Cover0.jpg" } ], "subtitle_info" : [ ], "source_path" : { "bucket" : "obs-host", "location" : "cn-north-4", "object" : "1/okFLV.flv" }, "output_path" : { "bucket" : "obs-host", "location" : "cn-north-4", "object" : "output/652c1e4085afeb22fdc256c6757d751b/" } }, "play_info_array" : [ { "play_type" : "hls", "url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/play_video/index.m3u8", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 0, "video_size" : 0, "width" : 0, "hight" : 0, "bit_rate" : 0, "frame_rate" : 0, "quality" : null } }, { "play_type" : "hls", "url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/play_video/b5d498082bbcff7a2055041d803ae2f9_1.m3u8", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 205, "video_size" : 14669824, "width" : 512, "hight" : 288, "bit_rate" : 534, "frame_rate" : 0, "quality" : null } } ] } ], "is_truncated" : 0, "total" : 1 } { "asset_info_array" : [ { "asset_id" : "652c1e4085afeb22fdc256c6757d751b", "status" : "PUBLISHED", "description" : "Asset meta is published", "base_info" : { "title" : "okFLV.flv", "video_name" : "okFLV.flv", "description" : null, "category_id" : -1, "category_name" : "其他", "create_time" : "20190704144303", "last_modified" : "20190704144303", "video_type" : "FLV", "tags" : null, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 244, "video_size" : 13682041, "width" : 512, "hight" : 288, "bit_rate" : 448, "frame_rate" : 30, "quality" : null }, "video_url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/45c2493abe68de3dac7e98b0dadcf8ce.flv", "sign_url" : "", "cover_info_array" : [ { "cover_url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/cover/Cover0.jpg" } ], "subtitle_info" : [ ], "source_path" : { "bucket" : "obs-host", "location" : "cn-north-4", "object" : "1/okFLV.flv" }, "output_path" : { "bucket" : "obs-host", "location" : "cn-north-4", "object" : "output/652c1e4085afeb22fdc256c6757d751b/" } }, "play_info_array" : [ { "play_type" : "hls", "url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/play_video/index.m3u8", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 0, "video_size" : 0, "width" : 0, "hight" : 0, "bit_rate" : 0, "frame_rate" : 0, "quality" : null } }, { "play_type" : "hls", "url" : "https://651.cdn-vod.huaweicloud.com/asset/652c1e4085afeb22fdc256c6757d751b/play_video/b5d498082bbcff7a2055041d803ae2f9_1.m3u8", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 205, "video_size" : 14669824, "width" : 512, "hight" : 288, "bit_rate" : 534, "frame_rate" : 0, "quality" : null } } ] } ], "is_truncated" : 0, "total" : 1 }
- 选择GET请求方法并输入URI。
support.huaweicloud.com/api-vod/vod_04_0214.html
看了此文的人还看了
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格
推荐文章