Encoding

Customize ProfileSet for encoding

1. Create a profile

If you need a new encoding configuration, you can use the following API to create a new profile with the desired attributes.

Here is an example of how to create a custom video profile with H.264 codec, 1280x720 resolution, 30 fps frame rate, and 2000 Kbps target video bitrate:

POST /bv/configuration/v1/profiles

{
  "profile":{
    "name":"720p-30fps-2Mbps",
    "video_codec":"VIDEO_CODEC_H264",
    "video_width":1280,
    "video_height":720,
    "video_bitrate":"2000000",
    "audio_bitrate":"128000",
    "codec_profile":"CODEC_PROFILE_AUTO",
    "level":"CODEC_PROFILE_LEVEL_AUTO",
    "frame_rate":"FRAME_RATE_30",
    "standard":"RESOLUTION_TYPE_HD"
  }
}

Note that you can customize the profile's name and set the video and audio bitrates according to your needs.

 

2. Create a profile set

Once you have created your custom video and audio profiles, you can create a custom profile set. A profile set is a collection of profiles that can be applied to VOD encodings. To create a custom profile set, You can use the following API:

POST /bv/configuration/v1/profile-sets

 

You can specify allowed values for each parameter in the profile_set object:

  • profile_ids: Specify the profiles this profile set should contain. Up to 10 profiles.
  • protocols: PROTOCOL_HLS and PROTOCOL_DASH.
  • smart_abr: Enable or disable the smart ABR feature.
  • multiple_audio_track: Up to 10 customized audio tracks if the lang_from field is LANG_FROM_CUSTOMIZE.
  • video_codec: VIDEO_CODEC_H264 or VIDEO_CODEC_H265.

Here is an example of how to create a custom profile set with a 720p profile, two audio tracks, and MPEG-HLS protocol:

{
  "profile_ids":[
    "profile_id_of_720p-30fps-2Mbps",
    "other_profile_id_1",
    "other_profile_id_2"
  ],
  "profile_set":{
    "multiple_audio_track":{
      "lang_customizes":[
        {
          "code":"en",
          "display":"English"
        },
        {
          "code":"ja",
          "display":"Japanese"
        }
      ],
      "lang_from":"LANG_FROM_CUSTOMIZE"
    },
    "name":"H.264-720p-30fps",
    "protocols":[
      "PROTOCOL_HLS"
    ],
    "smart_abr":false,
    "video_codec":"VIDEO_CODEC_H264"
  }
}

 

更新