/videos/update

Update the properties of a video.

Parameters

video_key : string

Key of the video which information to update.

title (optional) : string

Title of the video.

tags (optional) : string

Tags for the video. Multiple tags should be comma-separated.

description (optional) : string

Description of the video.

author (optional) : string

Author of the video.

date (optional) : signed integer

Video publish date. Specifies UTC date and time (in Unix timestamp format) when the video should be available for streaming.

expires_date (optional) : signed integer

Video publish expiration date. Specifies UTC date and time (in Unix timestamp format) when the video should stop being available for streaming. If not set opr set to empty string the video will be available indefinitely.

duration (optional) : float

Video duration in seconds. Should only be used if sourcetype is set to url.

trim_in_point (optional) : string

The timecode in point for trimming the source in the format HH:MM:SS.mmm, for example 03:02:45.106 for 3 hours, 2 minutes, and 45.106 seconds. If not specified and trim_out_point is specified, then the trim_in_point will automatically be set to 00:00:00.000. Likewise, if the value is out of bounds, then the trim_in_point will automatically be set to 00:00:00.000.

trim_out_point (optional) : string

The timecode out point for trimming the source in the format HH:MM:SS.mmm or 03:02:45.106 for 3 hours, 2 minutes, and 45.106 seconds. If not specified and trim_in_point is specified, then the trim_out_point will automatically be set to the duration of the original video. Likewise, if the value is out of bounds, then the trim_out_point will automatically be set to the duration of the original video.

link (optional) : string

The URL of the web page where this video is published.

protectionrule_key (optional) : string

Key of the Protection Rule that should be applied for this video.

sourceurl (optional) : string

URL of the video source. Only if sourcetype is set to url. If sourceformat is youtube, sourceurl can be specified as a full URL to the YouTube video or as an YouTube Video ID.

sourceformat (optional) : string

Video source format:

mp4

For videos with MIME type video/mp4.

webm

For videos with MIME type video/webm.

flv

For videos with MIME type video/flv.

aac

For audios with MIME type audio/aac.

mp3

For audios with MIME type audio/mpeg.

vorbis

For audios with MIME type audio/ogg.

m3u8

For a HLS M3U8 manifest URL.

smil

For a SMIL manifest URL.

download_url (optional) : string

URL from where to fetch an update for the original video file. An update for the original video file will be downloaded and processed on the server using this URL. Applicable only when update_file parameter set to True.

custom.param (optional) : string

User-defined parameter. param part of the request parameters (after the ‘.’ separator) specifies name of the parameter. Parameter name should adhere to the following naming rules:

  • name can contain letters, numbers and the following punctuation characters: ‘.’, ‘_’, ‘-‘
  • name cannot start with a number or punctuation character
  • name cannot contain spaces
  • do not use reserved names for custom parameters, reserved names include: `file`, `tracks`, `sources`, `feedid`, `mediaid`
  • do not use any existing non-custom parameter names, for example: `title`, `description`, `author`, etc.

Warning

Custom parameters that use a reserved name or an existing name are not guaranteed to be included in the output from the Delivery API.

User-defined parameter can be updated multiple times.

If parameter already exist in the database, it will be updated with the new value. If parameter name starts with ‘-‘, parameter with the same name (but without leading ‘-‘) will be deleted from the database.

update_file (optional) : string

Specifies if original file should be updated:

True

Update original file. A link block will be returned to which the file can be uploaded.

False

Do not update original file.

Default is False.

After new original file successfully uploaded, video status will be set to updating if previous status was ready or failed. Video status will be set to ready when new original and default conversion are ready for streaming. Video status will be set to failed if new original or default conversion has failed and previous status was failed or to ready if previous status was ready.

If new original or default conversion has failed, //video/error/message parameter in the /videos/list and /videos/show calls responses will indicate the reason of the failure. Error message parameter is not present when new original file and default conversion are successfully processed.

Warning

Original file can be only updated if the video has ready or failed status.

md5 (optional) : string

Original file MD5 message digest. If supplied, it will be checked by the API. Applicable only when update_file parameter set to True.

size (optional) : unsigned integer

Original file size. If supplied, it will be checked by the API. Applicable only when update_file parameter set to True.

Warning

The maximum allowed video file size is 25 GiB.

upload_method (optional) : string

Video upload method:

single

Video will be uploaded as a single file.

multipart

Video will be uploaded in multiple parts using resumable protocol.

s3

Video will be uploaded as a single file to AWS S3.

Warning

S3 file uploads are limited to files less than 5GB in size. For larger files, a different upload method will need to be used.

Default is single.

upload_content_type (optional) : string

Specifies MIME type of the video file that will be uploaded. Applicable only if upload_method is set to s3. If MIME type provided, it will be used to generate S3 upload signature.

Example response (update_file == False)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

Example response (update_file == True)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="tL17msiU">
    <link>
      <protocol>http</protocol>
      <address>upload.jwplatform.com</address>
      <path>/v1/videos/upload</path>
      <query>
        <key>vtQmcboj</key>
        <token>d97goJba57820fd88957Idd22e96cfe3K074v578</token>
      </query>
    </link>
  </video>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

//video/@key : string

Key of the updated video.

//video/link/protocol : string

Protocol part of the upload URL.

//video/link/address : string

Address part of the upload URL.

//video/link/path : string

Path part of the upload URL.

//video/link/query/key : string

Upload key query parameter.

//video/link/query/token : string

Upload token query parameter.

Example response (update_file == True, upload_method == multipart)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="tL17msiU">
    <link>
      <protocol>http</protocol>
      <address>upload.jwplatform.com</address>
      <path>/v1/videos/upload/resumable</path>
      <query>
        <key>vtQmcboj</key>
      </query>
    </link>
    <session_id>kwJei9j2vtQmcbojrlGJY3mbJFMHfzZwPXBwoSQr</session_id>
  </video>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

//video/@key : string

Key of the created video.

//video/link/protocol : string

Protocol part of the upload URL.

//video/link/address : string

Address part of the upload URL.

//video/link/path : string

Path part of the upload URL.

//video/link/query/key : string

Upload key query parameter.

//video/session_id : string

Resumable upload session ID.

Example response (upload_method == s3)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="tL17msiU">
    <link>
      <protocol>https</protocol>
      <address>upload-s3.jwplatform.com</address>
      <path>/vtQmcboj</path>
      <query>
        <AWSAccessKeyId>AKIAIRXCJ3TPZA4HVNYZ</AWSAccessKeyId>
        <Expires>1482772374</Expires>
        <Signature>5HBn2N6AtTwzK7M9aLxpvtbTxic=</Signature>
      </query>
    </link>
  </video>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

//video/@key : string

Key of the created video.

//video/link/protocol : string

Protocol part of the upload URL.

//video/link/address : string

Address part of the upload URL.

//video/link/path : string

Path part of the upload URL.

//video/link/query/AWSAccessKeyId : string

AWS access key used to sign upload URL.

//video/link/query/Signature : string

Upload URL signature.

//video/link/query/Expires : string

UTC date and time (in Unix timestamp format) when signature expires.

Example response (update_file == True, download_url is specified)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.