patch https://{app}.{filespin}.{io}/api/v1/user/settings/update?update_key=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 }
}
}
}aspectspecifies 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
paddingspecifies the HEX color code (without the # prefix) to use for padding a video is aspect ispadstoryboard->modeandstoryboard->mode_valuekeys specifies how the storyboard images will be captured. It can be one of:number(Extractmode_valueimages over entire video, such as whenmode_valueis 5, it'll extract 5 images over the entire video evenly spaced)second(Extract an image everymode_valuesecond over entire video)keyframes(Extract keyframes over entire video,mode_valuewill be ignored)
video_preview_startspecifies the starting time as either a second (like 5), or as%H:%M:%S.%fwherefis the frame to start.
REQUEST PARAMETERS
| Parameters | Type | Description |
|---|---|---|
key | string | Set toaddons |
value .video_transcode_test_mode | boolean | Set to true or false |
value .thumbnails | JSON | Object containing video-default and storyboard |
value.thumbnails.video_default | JSON | width and height of generated thumbnail in pixels |
value.thumbnails.storyboard | JSON | (optional), used only when Storyboard addon is enabled. |
value.thumbnails.storyboard.enabled | boolean | Set to true to enable storyboard false otherwise |
value.thumbnails.storyboard.mode | string | Specifies how the storyboard images will be captured. It can be one of: number, second, keyframes |
value.thumbnails.storyboard.mode_value | integer | Specifies how the storyboard images will be captured |
value.thumbnails.storyboard.width | integer | Specify the width of storyboard |
value.thumbnails.storyboard.height | integer | Specify the height of storyboard |
value.thumbnails.storyboard.public | boolean | Set true to make public false otherwise |
value.thumbnails.storyboard.aspect | string | 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 |
value.thumbnails.storyboard.padding | string | Specifies the HEX color code (without the # prefix) to use for padding a video is aspect is pad |
value.thumbnails.storyboard.upscale | boolean | Defaults to false. Upscale the output if original is of lower size than requested output size. |
value .preview | JSON | Accepts the keys below |
value .preview.video_preview_public | boolean | Defaults to false. Make the output file public in Storage to allow playback using /transcodes API without signed URL |
value .preview.video_preview_start | integer or timecode string | Specifies 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_length | integer | Defaults to entire video. Length of clip in seconds |
value .preview.video_preview_preset | string | Any 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_enabled | boolean | Set true to enable video preview |
value .preview.video_preview_aspect | string | Defaults 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_padding | string | Defaults 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_upscale | boolean | Defaults to false. Upscale the output if original is of lower size than requested output size. |
value .transcodes | JSON | Specify 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-video | JSON | Specify the values for enabled, public, aspect, padding, upscale, watermark keys. Notethatwatermark is only used in hls-video and not other transcode updates. |