Create an Encoding Job
To create streamable DASH and HLS assets, you need to submit a Video on Demand (VOD) encoding request. Before you begin, ensure that you have:
- Video files uploaded to the Video Library
- Additional assets, such as subtitles or watermarks, if needed
- Resource IDs for all required content
For more information about uploading to Video Library, see Upload Assets.
Here's a simple diagram of the encoding job process:
Create VOD Encoding Job
Once all the required resources are prepared and you have their corresponding IDs, you can create the VOD encoding request. You can also specify detailed settings using the supported parameters described below. To create and edit a VOD, using the following APIs:
- Create:
POST /bv/cms/v1/vods
- Update:
PUT /bv/cms/v1/vods/:id
Parameters | Required | Description |
---|---|---|
name | Required | Name of the VOD |
profile_set_id | Required | Specify the ID of ProfileSet to apply to the VOD |
source | Required | Refer to the steps to define the type of source file and create associate object |
queue | Required | Define the processing speed for the encoding job: QUEUE_STANDARD : Standard processing speedQUEUE_PRIORITY : Faster processing speed |
security | Required | Content protection settings for the VOD. |
schedule | Required | Define the availability schedule for the VOD. |
permission | Required | Manage file permissions based on different roles. Enable to grant individual permission to a specific user or group as well. |
pte | Optional | Set to PTE_PROFILE_HIGH if you would like to enable the per-title encoding. |
metadata | Optional | Define description and labels for the VOD. |
export | Optional | Define the export setting of the VOD. |
byo_cdn | Optional | Define the setting of bring-your-own cdn. |
player | Optional | Customize the preferences on player. |
mode | Optional | ENCODING_MODE_QUALITY_FIRST : Prioritizes the highest quality, but requires more encoding time (default).ENCODING_MODE_SPEED_FIRST : Minimizes encoding time as much as possible without compromising quality. |
Create Source Object
Based on the source type, create the source object accordingly:
SOURCE_TYPE_LIBRARY
, which is uploaded from your local
"source":{
"type":"SOURCE_TYPE_LIBRARY",
"library":{
"video":{
"id":"your_video_id_in_library"
}
}
}
SOURCE_TYPE_CLOUD_STORAGE
, which is copied from your cloud
"source":{
"type":"SOURCE_TYPE_CLOUD_STORAGE",
"cloud_storage":{
"id":"your_cloud_storage_id",
"file_path":"/path/to/cloud/storage/file.mp4"
}
}