VOD Downloads


VOD Downloads are a feature within the VIS where download clips can be made against an Event, processed via a Vuflow, and sent to the given email address.

The actions here allow you to create downloads, fetch the details, and retry them.

Additionally supported is the option to specify an EmailLanguage, which will use a different email template (if available) to send an appropriate language email to the end user.


VOD Download Object

{
    "id": "f9a4c3ab-c466-4be9-b8c0-0018ee27790c",
    "contentId": "64d45042-1f5b-4d02-a0b8-f1643e38a873",
    "eventId": "6f9b7d7d-4caa-0149-9fff-e54b578124f8",
    "downloadPath": "downloads/64d45042-1f5b-4d02-a0b8-f1643e38a873/64d45042-1f5b-4d02-a0b8-f1643e38a873.mp4",
    "emailAddress": "email-address@domain.com",
    "creationDate": "2018-10-16T21:34:22Z",
    "completionDate": "2018-10-17T01:18:40Z",
    "failureDate": null,
    "downloadUrl": "http://domain.com/content/vod/downloads/64d45042-1f5b-4d02-a0b8-f1643e38a873/64d45042-1f5b-4d02-a0b8-f1643e38a873.mp4",
    "downloadTaskJson": "{\"parameters\":{\"content_id\":\"64d45042-1f5b-4d02-a0b8-f1643e38a873\",\"output_folder\":\"downloads/64d45042-1f5b-4d02-a0b8-f1643e38a873\",\"clips\":[{\"source\":\"http://origin-url.com/content/vod/671692db-ca66-4a98-838e-45d3a7566e62/671692db-ca66-4a98-838e-45d3a7566e62_nodrm_1ab6514d-36aa-48cf-8e86-4ff374fe2b0f.ism/Manifest\"},{\"source\":\"http://origin-url.com/content/vod/6f9b7d7d-4caa-0149-9fff-e54b578124f8/6f9b7d7d-4caa-0149-9fff-e54b578124f8_nodrm_07dca19e-802e-45d3-8259-3c7c58be080d.ism/Manifest\",\"start\":\"2018-10-10T14:30:31.081Z\",\"end\":\"2018-10-10T16:30:20.361Z\",\"filter\":\"(type==\\\"audio\\\"&&systemLanguage==\\\"eng\\\")||(type==\\\"video\\\"&&DisplayWidth==1024&&DisplayHeight==576)\"}],\"rest_endpoints\":[],\"encrypted\":false,\"frame_accurate\":true,\"create_mp4\":false,\"copy_ts\":true,\"create_via_ffmpeg\":true},\"client\":\"europarl\",\"job\":{\"workflow\":\"vodcapture-mp4\"}}",
    "emailLanguage": "en"
}

Supported Actions

POST /voddownload/

Create a new VOD Download.

Request Body:

{
  "emailAddress": "email-address@domain.com",
  "contentId": "your-content-id-here",
  "frameAccurate": false,
  "emailLanguage": null,
  "mp4Filename": "my-mp4-name.mp4",
  "downloadClips": {}
}

Notes: if you do not provide a content Id, one will be generated for you.

Download Clips:

The download system supports multiple clips which can be stitched together. It is recommended to using the filter property to ensure that each clip has the same number of tracks and the same bitrates, else the stitching is likely to fail.

Below is a single clip:

{
  "eventId": "98f70502-d120-4ee6-991e-7dd67eefe699",
  "start": "2018-10-10T14:30:31.081Z",
  "end": "2018-10-10T16:30:20.361Z",
  "filter": "",
  "isMasterClip": false
}

You can set the Start and End to null to request the entire Event. You should use an elapsed time format (00:00:00 -> duration) if the content does not have timestamps.

You can use the Filter to insert USP filter options.

You will want to specify IsMasterClip as true only 1 clip, and for the one which the download should be associated with. If left as False, the download will be valid, but metadata will be harder to match up. In the case that you do specify a master clip, but not an Mp4Filename, then the filename will be based off of the master clip Event’s Title.

Response: 201 Created


GET /voddownload/{id}

Get VOD Download by Id.

Response:

200 OK and a JSON containing the VOD Download object.

or

204 No Content if no VOD Download is found.


GET /voddownload/contentid

Get VOD Download by Content Id.

Query Parameters:

Name Type Required Description
id string Yes The Content ID. Must be percent-encoded.

Response:

200 OK and a JSON containing the VOD Download object.

or

204 No Content if no VOD Download is found.


GET /voddownload/

Get all VOD Downloads.

Response:

200 OK and a JSON array containing multiple VOD Download objects.

or

204 No Content if none exist.


GET /voddownload/event/{eventId}

Get all VOD Downloads by Event Id.

Response:

200 OK and a JSON array containing multiple VOD Download objects.

or

204 No Content if none exist.


GET /voddownload/retry/{id}

Retry a VOD Download by Id.

Response: 200 OK


GET /voddownload/retry/contentid

Retry a VOD Download by Content Id.

Query Parameters:

Name Type Required Description
id string Yes The Content ID. Must be percent-encoded.

Response: 200 OK


DEL /voddownload/

Delete expired downloads, with an additional buffer parameter.

Expiration period is defined in the system configuration, the purpose here being that any VOD Downloads which are no longer available can easily be deleted from the database.

Query Parameters:

Buffer: {int} - number of days to extend the expiration period by when deleting.

Response: 410 Gone


DEL /voddownload/{id}

Delete VOD Download by Id.

Response: 410 Gone


DEL /voddownload/contentid

Delete VOD Download by Content Id.

Query Parameters:

Name Type Required Description
id string Yes The Content ID. Must be percent-encoded.

Response: 410 Gone


DEL /voddownload/event/{eventid}

Delete downloads for a specified Event Id.

Warning: this will remove all downloads for this Event, not just expired ones.

Response: 410 Gone