Skip to main content

Monitoring Job Status

To determine the encoding status of a VOD, you can use the following API:

GET /bv/cms/v1/vods/{id}

This endpoint retrieves the latest encoding status and additional details for the specified VOD. The status field in the response indicates the current status of the VOD.

Here is the example of the response.

{
"vod": {
"cover_image": {
"auto": {
"name": "AUTO",
"size": "39430",
"url": "https://d3r4shtv85jcno.cloudfront.net/42f6c33e-f632-44e5-8042-05abb5fa2223/vod/dfd6e1a9-3f38-43dc-9966-f35caefe77b5/cover_image/cover_image.jpg"
},
"type": "COVER_IMAGE_TYPE_AUTO",
"updated_at": "2023-05-30T10:43:37Z"
},
"created_at": "2023-05-30T10:34:29Z",
"export": null,
"id": "aca7071e-f09a-4bc5-8955-5f316142f574",
"labels": [],
"metadata": {
"labels": [],
"long_description": "",
"short_description": ""
},
"name": "video.mp4",
"permission": {
"assignments": [
{
"access_role": "ACCESS_ROLE_SUPER_EDITOR",
"assigned_type": "ASSIGNED_TYPE_OWNER",
"email": "",
"id": "",
"name": ""
}
],
"default_access_role": "ACCESS_ROLE_DENY"
},
"previous_status": "VOD_STATUS_ENCODED",
"profile_set": {
"id": "6a2b2ea3-9e35-4216-93c9-da09dee5ab12",
"multiple_audio_track": {
"lang_customizes": [],
"lang_from": "LANG_FROM_FIRST_TRACK"
},
"name": "H.264-1080P-30fps",
"preset": false,
"profiles": [
{
"audio_bitrate": "128",
"b_frame": true,
"codec_profile": "CODEC_PROFILE_AUTO",
"frame_rate": "FRAME_RATE_30",
"gop_size": 2,
"id": "57acf6c4-688e-47c5-a4f9-548c64ef6ddb",
"level": "CODEC_PROFILE_LEVEL_AUTO",
"name": "1080p-5Mbps",
"preset": false,
"segment_duration": 6,
"standard": "RESOLUTION_TYPE_UNSPECIFIED",
"video_bitrate": "5000",
"video_codec": "VIDEO_CODEC_H264",
"video_height": 1080,
"video_width": 1920
},
{
"audio_bitrate": "128",
"b_frame": true,
"codec_profile": "CODEC_PROFILE_AUTO",
"frame_rate": "FRAME_RATE_30",
"gop_size": 2,
"id": "d8b7caa0-7487-4cdf-ab64-44cf54783d34",
"level": "CODEC_PROFILE_LEVEL_AUTO",
"name": "720p-2.5Mbps",
"preset": false,
"segment_duration": 6,
"standard": "RESOLUTION_TYPE_UNSPECIFIED",
"video_bitrate": "2500",
"video_codec": "VIDEO_CODEC_H264",
"video_height": 720,
"video_width": 1440
},
{
"audio_bitrate": "96",
"b_frame": true,
"codec_profile": "CODEC_PROFILE_AUTO",
"frame_rate": "FRAME_RATE_30",
"gop_size": 2,
"id": "39861dab-83da-4cd7-bb58-7ae6af648c19",
"level": "CODEC_PROFILE_LEVEL_AUTO",
"name": "480p-1.5Mbps",
"preset": false,
"segment_duration": 6,
"standard": "RESOLUTION_TYPE_UNSPECIFIED",
"video_bitrate": "1500",
"video_codec": "VIDEO_CODEC_H264",
"video_height": 480,
"video_width": 850
},
{
"audio_bitrate": "96",
"b_frame": true,
"codec_profile": "CODEC_PROFILE_AUTO",
"frame_rate": "FRAME_RATE_30",
"gop_size": 2,
"id": "31bb7972-1c87-44c2-a07c-fe9d18321644",
"level": "CODEC_PROFILE_LEVEL_AUTO",
"name": "360p-700kbps",
"preset": false,
"segment_duration": 6,
"standard": "RESOLUTION_TYPE_UNSPECIFIED",
"video_bitrate": "700",
"video_codec": "VIDEO_CODEC_H264",
"video_height": 360,
"video_width": 640
},
{
"audio_bitrate": "64",
"b_frame": true,
"codec_profile": "CODEC_PROFILE_AUTO",
"frame_rate": "FRAME_RATE_30",
"gop_size": 2,
"id": "54479d60-c1ba-41fa-898b-3d7fe983b5ac",
"level": "CODEC_PROFILE_LEVEL_AUTO",
"name": "240p-400kbps",
"preset": false,
"segment_duration": 6,
"standard": "RESOLUTION_TYPE_UNSPECIFIED",
"video_bitrate": "400",
"video_codec": "VIDEO_CODEC_H264",
"video_height": 240,
"video_width": 426
}
],
"protocols": [
"PROTOCOL_DASH",
"PROTOCOL_HLS"
],
"smart_abr": false,
"video_codec": "VIDEO_CODEC_H264"
},
"pte": {
"profile": "PTE_PROFILE_UNSPECIFIED"
},
"queue": "QUEUE_STANDARD",
"schedule": {
"enable": false,
"end_time": null,
"start_time": null
},
"security": {
"domain_control": {
"domains": [],
"enabled": false
},
"geo_control": [],
"privacy": {
"token": null,
"type": "SECURITY_PRIVACY_TYPE_PUBLIC"
},
"protection": {
"type": "PROTECTION_TYPE_UNSPECIFIED"
},
"watermark": {
"enabled": false,
"position": "WATERMARK_POSITION_UNSPECIFIED",
"type": "WATERMARK_TYPE_UNSPECIFIED"
}
},
"source": {
"cloud_storage": null,
"library": {
"subtitles": [
{
"code": "en",
"display": "English",
"id": "24bc359e-3fe3-4cb6-9278-1a1ceaf35d52",
"name": "example.srt"
}
],
"video": {
"id": "63df97e3-519b-4426-bf01-d1841cdc2ccd"
}
},
"type": "SOURCE_TYPE_LIBRARY"
},
"source_file_info": {
"audios": [
{
"bitrate": "128",
"codec": "AUDIO_CODEC_AAC",
"lang": "und",
"sample_rate": "48000"
}
],
"bitrate": "2337",
"duration": 300.032,
"file_name": "video.mp4",
"size": "92797819",
"video": {
"aspect_ratio": "DISPLAY_ASPECT_RATIO_16_9",
"bitrate": "2337",
"codec": "VIDEO_CODEC_H264",
"frame_rate": "FRAME_RATE_UNSPECIFIED",
"height": 1080,
"interlace": false,
"width": 1920
}
},
"status": "VOD_STATUS_SUCCEEDED",
"stream": [
{
"manifests": [
{
"protocol": "PROTOCOL_DASH",
"uris": [
{
"resolutions": [
{
"height": "1080",
"width": "1920"
},
{
"height": "720",
"width": "1280"
},
{
"height": "480",
"width": "854"
},
{
"height": "360",
"width": "640"
},
{
"height": "240",
"width": "426"
}
],
"uri": "https://d3r4shtv85jcno.cloudfront.net/42f6c33e-f632-44e5-8042-05abb5fa2223/vod/dfd6e1a9-3f38-43dc-9966-f35caefe77b5/vod/dash.mpd"
}
]
},
{
"protocol": "PROTOCOL_HLS",
"uris": [
{
"resolutions": [
{
"height": "1080",
"width": "1920"
},
{
"height": "720",
"width": "1280"
},
{
"height": "480",
"width": "854"
},
{
"height": "360",
"width": "640"
},
{
"height": "240",
"width": "426"
}
],
"uri": "https://d3r4shtv85jcno.cloudfront.net/42f6c33e-f632-44e5-8042-05abb5fa2223/vod/dfd6e1a9-3f38-43dc-9966-f35caefe77b5/vod/hls.m3u8"
}
]
}
],
"thumbnail": {
"uri": "https://d3r4shtv85jcno.cloudfront.net/42f6c33e-f632-44e5-8042-05abb5fa2223/vod/dfd6e1a9-3f38-43dc-9966-f35caefe77b5/thumbnail/00/thumbnails.vtt"
}
}
],
"updated_at": "2023-05-30T10:43:49Z"
}
}

If you need a history of status updates for the specified VOD, use this API:

GET bv/cms/v1/vods/:id/status

The response provides a series of status updates for the VOD, including the time each status was reached.

Here is the example of the response.

{
"stages": [
{
"code": "",
"complete_time": "2023-06-01T07:15:06Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_CREATED"
},
{
"code": "",
"complete_time": "2023-06-01T07:15:36Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_INGESTED"
},
{
"code": "",
"complete_time": "2023-06-01T07:15:06Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_QUEUED"
},
{
"code": "",
"complete_time": "2023-06-01T07:25:11Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_ENCODED"
},
{
"code": "",
"complete_time": "2023-06-01T07:25:11Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_DEPLOYED"
},
{
"code": "",
"complete_time": "2023-06-01T07:25:11Z",
"error_infos": [],
"message": "",
"status": "VOD_STATUS_SUCCEEDED"
}
]
}

Status Values and Descriptions

StatusDescription
VOD_STATUS_CREATEDThe encoding job has been created.
VOD_STATUS_INGESTEDThe uploaded file is currently being copied to the system's input storage.
VOD_STATUS_QUEUEDThe file is in the queue, waiting for encoding resources.
VOD_STATUS_ENCODEDThe file is currently being encoded.
VOD_STATUS_DEPLOYEDThe file is packaged and deployed to the Content Delivery Network (CDN).
VOD_STATUS_SUCCEEDEDAll stages of the encoding process have been completed.
VOD_STATUS_FAILEDThe encoding job has encountered an error or failure.
VOD_STATUS_CANCELLEDThe encoding job has been canceled.
VOD_STATUS_DELETEDThe encoding job has been deleted.

It is recommended to use the API periodically to retrieve the latest encoding status of a VOD until it reaches the VOD_STATUS_SUCCEEDED state, indicating successful completion.

Error Handling

When a VOD_STATUS_FAILED status is returned, the response includes an error_infos array, which provides detailed information about the errors encountered. Below is an example of such a response:

{
"status": "VOD_STATUS_FAILED",
"complete_time": "2024-06-24T08:41:14Z",
"message": "",
"code": "",
"error_infos": [
{
"reason": "ERROR_REASON_LUKE_ERROR",
"domain": "core.encoding.v1",
"metadata": {
"amount": "1",
"error_code": "1008",
"error_message": "The number of audio streams 1 in the mezzanine file doesn't match the expected number of customized audio streams."
}
},
{
"reason": "ERROR_REASON_ENCODING_ERROR",
"domain": "core.stream.v1",
"metadata": {
"amount": "1",
"error_code": "1008",
"error_message": "The number of audio streams 1 in the mezzanine file doesn't match the expected number of customized audio streams."
}
},
{
"reason": "ERROR_REASON_ENCODING_ERROR",
"domain": "bv.cms.v1",
"metadata": {
"amount": "1",
"error_code": "1008",
"error_message": "The number of audio streams 1 in the mezzanine file doesn't match the expected number of customized audio streams."
}
}
]
}

Structure of error_infos

The error_infos array contains a list of error objects. The first element in this array is considered the primary error, while the subsequent elements provide additional error information. Each error object includes the following fields:

{
"reason": "ERROR_REASON_LUKE_ERROR",
"domain": "core.encoding.v1",
"metadata": {
"amount": "1",
"error_code": "1008",
"error_message": "The number of audio streams 1 in the mezzanine file doesn't match the expected number of customized audio streams."
}
}
  • reason: A string indicating the reason for the error (e.g., ERROR_REASON_LUKE_ERROR).
  • domain: Specifies the domain in which the error occurred (e.g., core.encoding.v1).
  • metadata: An object containing additional details about the error:
    • error_code: A code representing the specific error (e.g., 1008).
    • error_message: A descriptive message providing more context about the error (e.g., "The number of audio streams 1 in the mezzanine file doesn't match the expected number of customized audio streams.").

For integration, you only need to focus on the field error_code in the metadata object.

Error Codes

Error CodeReasonComment
1000Invalid file format.Content is abnormal. Refer to info 1.
1001Invalid file size. (size = 0)Content is abnormal. Refer to info 1.
1002There is no audio stream in the mezzanine file.Content is abnormal. Refer to info 1.
1003There is no video stream in the mezzanine file.Content is abnormal. Refer to info 1.
1004Unsupported video codec {codec_name}.Content is abnormal. Refer to info 1.
1005Unsupported audio codec {codec_name}.Content is abnormal. Refer to info 1.
1006There are {amount} video streams in the mezzanine file. Maximum accepted number is {max_amount}.Content is abnormal. Refer to info 1.
1007There are {amount} audio streams in the mezzanine file. Maximum accepted number is {max_amount}.Content is abnormal. Refer to info 1.
1008The number of audio streams {amount} in the mezzanine file doesn't match the expected number of customized audio streams.Content is abnormal. Refer to info 1.
1009Invalid subtitle file format.Content is abnormal. Refer to info 1.
9999Unknown cause.Need investigation. Refer to info 2.
10001Upload from cloud storage failedNeed investigation. Refer to info 2.
10002Export to cloud storage failedNeed investigation. Refer to info 2.
10003Generate CDN endpoint failedNeed investigation. Refer to info 2.
info
  1. You should verify the contents and ensure they are correct before initiating the VOD encoding process.
  2. Report the issue along with the VOD ID to BlendVision for further investigation.