Guides

Update Video

Update video by sending below payload. All keys are mandatory except storyboard (storyboard is needed only when Video Storyboard addon is enabled).

REQUEST PAYLOAD

{
  "key": "video",
  "value": {
    "video_transcode_test_mode": true,
    "thumbnails": {
       "video_default": {
         "height": 480,
         "width": 640
       },
       "storyboard": {
          "enabled": true,
          "mode": "number",
          "mode_value": 5,
          "width": 480,
          "height": 360,
          "public": true,
          "aspect": "pad",
          "padding": "000000",
          "upscale": true
        }
    },
    "preview": {
      "video_preview_public": true,
      "video_preview_start": "00:00:03.001",
      "video_preview_length": 5,
      "video_preview_preset": "480p-wm-video",
      "video_preview_enabled": true,
      "video_preview_aspect": "pad",
      "video_preview_padding": "000000",
      "video_preview_upscale": true
    },
    "transcodes": {
      "360p-video": { "enabled": true, "public": false, "aspect": "pad", "padding": "000000", "upscale": true },
      "360p-wm-video": { "enabled": true, "public": true, "aspect": "pad", "padding": "000000", "upscale": true },
      "480p-video": { "enabled": true, "public": false, "aspect": "pad", "padding": "000000", "upscale": true },
      "480p-wm-video": { "enabled": true, "public": true, "aspect": "pad", "padding": "000000", "upscale": true },
      "720p-video": { "enabled": true, "public": false, "aspect": "pad", "padding": "000000", "upscale": true },
      "720p-wm-video": { "enabled": true, "public": true, "aspect": "pad", "padding": "000000", "upscale": true },
      "1080p-video": { "enabled": true, "public": false, "aspect": "pad", "padding": "000000", "upscale": true },
      "1080p-wm-video": { "enabled": true, "public": true, "aspect": "pad", "padding": "000000", "upscale": true },
      "hls-video": { "enabled": true, "public": true, "aspect": "pad", "padding": "000000", "upscale": true, "watermark": true }
    }
  }
}
  • aspect specifies how the output video will be filled if it's aspect does not fit the requested size. It can be one of:
    • pad, preserve, scale, crop
  • padding specifies the HEX color code (without the # prefix) to use for padding a video is aspect is pad
  • storyboard->mode and storyboard->mode_value keys specifies how the storyboard images will be captured. It can be one of:
    • number (Extract mode_value images over entire video, such as when mode_value is 5, it'll extract 5 images over the entire video evenly spaced)
    • second (Extract an image every mode_value second over entire video)
    • keyframes (Extract keyframes over entire video, mode_value will be ignored)
  • video_preview_start specifies the starting time as either a second (like 5), or as %H:%M:%S.%f where f is the frame to start.

REQUEST PARAMETERS

ParametersTypeDescription
keystringSet toaddons
value .video_transcode_test_modebooleanSet to true or false
value .thumbnailsJSONObject containing video-default and storyboard
value.thumbnails.video_defaultJSONwidth and height of generated thumbnail in pixels
value.thumbnails.storyboardJSON(optional), used only when Storyboard addon is enabled.
value.thumbnails.storyboard.enabledbooleanSet to true to enable storyboard false otherwise
value.thumbnails.storyboard.modestringSpecifies how the storyboard images will be captured. It can be one of: number, second, keyframes
value.thumbnails.storyboard.mode_valueintegerSpecifies how the storyboard images will be captured
value.thumbnails.storyboard.widthintegerSpecify the width of storyboard
value.thumbnails.storyboard.heightintegerSpecify the height of storyboard
value.thumbnails.storyboard.publicbooleanSet true to make public false otherwise
value.thumbnails.storyboard.aspectstringSpecifies how the output video will be filled if it's aspect does not fit the requested size. It can be one of: - pad, preserve, scale, crop
value.thumbnails.storyboard.paddingstringSpecifies the HEX color code (without the # prefix) to use for padding a video is aspect is pad
value.thumbnails.storyboard.upscalebooleanDefaults to false. Upscale the output if original is of lower size than requested output size.
value .previewJSONAccepts the keys below
value .preview.video_preview_publicbooleanDefaults to false. Make the output file public in Storage to allow playback using /transcodes API without signed URL
value .preview.video_preview_startinteger or timecode stringSpecifies the starting time as either a second (like 5), or as %H:%M:%S.%f where f is the frame to start.
value .preview.video_preview_lengthintegerDefaults to entire video. Length of clip in seconds
value .preview.video_preview_presetstringAny of the standard video transcode keys 360p-video, 360p-wm-video, 480p-video, 480p-wm-video, 720p-video, 720p-wm-video, 1080p-video, 1080p-wm-video
value .preview.video_preview_enabledbooleanSet true to enable video preview
value .preview.video_preview_aspectstringDefaults to pad. Determines aspect and padding. Can be pad - to add padding, preserve - preserves original aspect ratio, padding color will be ignored, scale - scales the output, crop - crops the output to match requested dimensions.
value .preview.video_preview_paddingstringDefaults to "000000" - black. Padding color. Applies only when aspect is pad. Value is a six character colorcode such as "000000" - black, "ffffff" - white, etc.
value .preview.video_preview_upscalebooleanDefaults to false. Upscale the output if original is of lower size than requested output size.
value .transcodesJSONSpecify the Transcode keys. Allowed keys: 360p-video ,360p-wm-video, 480p-video, 480p-wm-video, 720p-video, 720p-wm-video, 1080p-video, 1080p-wm-video,hls-video. Provide appropriate values for enabled, public, aspect ,padding, upscale. For details on these keys, seevalue.preview above.
value.transcodes.hls-videoJSONSpecify the values for enabled, public, aspect, padding, upscale, watermark keys. Note that watermark is only used in hls-video and not other transcode updates.
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!