Querying Hosted Media Asset Details (Not Available Soon)
Function
Queries details about a media asset hosted by OBS
URI
GET /v1.0/{project_id}/asset/obs/host/task/details
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
source_bucket |
Yes |
String |
Bucket where the input media asset is stored |
source_object |
Yes |
String |
objectKey of the input media asset |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
asset_id |
String |
Media asset ID assigned by VOD. This parameter can only be queried but cannot be modified. |
asset_status |
String |
Media file status
|
transcode_status |
String |
Transcoding status
|
base_info |
BaseInfo object |
Basic media file information. |
transcode_info |
TranscodeInfo object |
Information about the transcoded file
NOTE:
Such information can be queried only after the transcoding succeeded, and is unavailable when the transcoding is not performed, is being performed, or failed. |
Parameter |
Type |
Description |
---|---|---|
title |
String |
Media file title The value is UTF-8-encoded and contains a maximum of 128 characters. |
video_name |
String |
Media asset file name |
description |
String |
Media file description The value contains a maximum of 1024 characters. |
category_id |
Long |
Media asset category ID |
category_name |
String |
Media asset category name |
create_time |
String |
Time when the media file was created The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
last_modified |
String |
Time when the media file was last modified The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
video_type |
String |
Audio/Video file type Possible values are:
|
tags |
String |
Media file tag Each tag contains up to 16 characters and up to 16 tags are allowed. Use commas (,) to separate tags. The values are UTF-8-encoded. |
meta_data |
MetaData object |
Video metadata It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate. |
video_url |
String |
URL for accessing the original video file |
sign_url |
String |
Temporary access URL of the original video file in OBS. A specific value is returned only when the API for Querying File Information is called. |
cover_info_array |
Array of CoverInfo objects |
Cover information |
subtitle_info |
Array of SubtitleInfo objects |
Subtitle information array |
source_path |
File_addr object |
Media asset storage parameters. |
output_path |
File_addr object |
Media asset storage parameters. |
Parameter |
Type |
Description |
---|---|---|
url |
String |
URL for downloading the subtitle file |
id |
Integer |
Subtitle file ID |
type |
String |
Subtitle file type |
language |
String |
Subtitle file language |
Parameter |
Type |
Description |
---|---|---|
bucket |
String |
OBS bucket name |
location |
String |
Name of the region where the bucket is located. For example, the region name of CN North-Beijing4 is cn-north-4. The created bucket must be in the region of the VOD service. |
object |
String |
File path |
Parameter |
Type |
Description |
---|---|---|
template_group_name |
String |
Name of a transcoding template group |
output |
Array of Output objects |
Array in the output file
|
exec_desc |
String |
Execution description |
transcode_status |
String |
Transcoding status Possible values are:
|
Parameter |
Type |
Description |
---|---|---|
play_type |
String |
Protocol type Possible values are:
|
url |
String |
Streaming URL |
group_id |
String |
Transcoding group ID. |
group_name |
String |
Transcoding group name. |
encrypted |
Integer |
Whether the stream is encrypted Possible values are:
|
quality |
String |
Definition Possible values are:
|
meta_data |
MetaData object |
Video metadata It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate. |
Parameter |
Type |
Description |
---|---|---|
pack_type |
String |
Video container format Possible values are:
|
codec |
String |
Video encoding format. Options:
NOTE:
If unknown is returned for codec, the current audio/video encoding format sent by the user cannot be parsed. |
duration |
Long |
Video duration. If the value of the original video duration is not an integer, the value of this field is rounded up. |
video_size |
Long |
Video file size Unit: byte |
width |
Long |
Video width, in pixels
|
hight |
Long |
Video height, in pixels.
|
bit_rate |
Long |
Average video bitrate |
frame_rate |
Long |
Frame rate, in FPS Possible values are:
Unit: FPS |
quality |
String |
Definition Possible values are:
|
audio_channels |
Integer |
Number of audio channels |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
Queries details about a hosted media file.
GET https://{endpoint}/v1.0/{project_id}/asset/obs/host/task/details?source_bucket={source_bucket}&source_object={source_object}
Example Responses
Status code: 200
The information is returned when the request succeeds.
{ "asset_id" : "41cff636d5b12a51e7eb2838bbf45201", "base_info" : { "title" : "Avatar", "video_name" : "Video on Demand (VOD).mp4", "description" : "Avatar, marketed as James Cameron's Avatar, is a 2009 American\nepic science fiction film directed, written, produced, and\nco-edited by James Cameron", "category_id" : -1, "category_name" : "Other", "create_time" : "20190612032250", "last_modified" : "20190613075030", "video_type" : "MP4", "tags" : "test1,test2", "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 131, "video_size" : 4942645, "width" : 1280, "hight" : 720, "height" : 720, "bit_rate" : 173, "frame_rate" : 30 }, "video_url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/5597e59de70722eaeb9b18c274e249b2.mp4", "sign_url" : "", "cover_info_array" : [ { "cover_url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/cover/Cover0.jpg" } ] }, "transcode_info" : { "template_group_name" : "system_template_group", "output" : [ { "play_type" : "HLS", "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/index.m3u8", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 0, "video_size" : 0, "width" : 0, "hight" : 0, "height" : 0, "bit_rate" : 0, "frame_rate" : 0 } }, { "play_type" : "HLS", "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/VODVOD video _1_854X480_600_0.m3u8", "encrypted" : 0, "quality" : "SD", "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 130, "video_size" : 7976960, "width" : 854, "hight" : 480, "height" : 480, "bit_rate" : 421, "frame_rate" : 30000, "quality" : "SD" } }, { "play_type" : "DASH", "url" : "https://355.cdn-vod.huaweicloud.com/asset/41cff636d5b12a51e7eb2838bbf45201/play_video/index.mpd", "encrypted" : 0, "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 0, "video_size" : 0, "width" : 0, "hight" : 0, "height" : 0, "bit_rate" : 0, "frame_rate" : 0 } }, { "play_type" : "DASH", "encrypted" : 0, "quality" : "SD", "meta_data" : { "pack_type" : null, "codec" : "H.264", "duration" : 130, "video_size" : 7976960, "width" : 854, "hight" : 480, "height" : 480, "bit_rate" : 421, "frame_rate" : 30000, "quality" : "SD" } } ], "exec_desc" : "Transcode success", "transcode_status" : "TRANSCODE_SUCCEED" } }
Status code: 403
The information is returned when the request fails.
{ "error_code" : "VOD.10064", "error_msg" : "Media asset classification does not exist, please check." }
Status Codes
Status Code |
Description |
---|---|
200 |
The information is returned when the request succeeds. |
403 |
The information is returned when the request fails. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot