# VOD Encoded Formats

API call format

GET /broker/vod/list/<source_guid>

Description

List all encoded formats for VOD by GUID. This call gets encoded formats (variants) for VOD by known GUID gouped by codec (HLS,DASH,MP4). All variant with available bitRate, width and height are listed. For HLS cdnUrl points .m3u8 file. For DASH is .mpd file. For MP4 is .mp4 file.

Precondition:

  • No authorization token is needed.
  • Mandatory elements (should be specified):
    • <source_guid> - valid source guid. Take a specific source guid using Vod list API call.

Postcondition

  1. On success response code should be 200
  2. On success the whole JSON body of the available video formats for all codecs is returned.
  3. On failure an error will be returned with the right error code and description.

Example:

[Request] GET https://<base_api_url>/broker/vod/list/<source_guid>`
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"}
[Response] 200
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Response] 
{
  "status": true,
  "data": {
    "hasHls": true,
    "hls": {
      "destBucket": "<vod-destinationbucket>",
      "mediaType": "hls_master",
      "guid": "<source_guid>",
      "variants": [
        {
          "path": "<vod-destinationbucket>/sources/<source_guid>/hls/<hls_name>_1280x720p-2.5Mbps-2500000.m3u8",
          "bitRate": "2500000",
          "cdnUrl": "https://<server>/sources/<source_guid>/hls/<hls_name>_1280x720p-2.5Mbps-2500000.m3u8",
          "filePath": "<source_guid>/hls/<hls_name>_1280x720p-2.5Mbps-2500000.m3u8",
          "width": 1280,
          "mediaType": "hls_manifest_720_2500000",
          "height": 720
        },
        {
          "path": "<vod-destinationbucket>/sources/<source_guid>/hls/<hls_name>_480x270p-0.4Mbps-400000.m3u8",
          "bitRate": "400000",
          "cdnUrl": "https://<server>/sources/<source_guid1>/hls/<hls_name>_480x270p-0.4Mbps-400000.m3u8",
          "filePath": "<source_guid>/hls/<hls_name>_480x270p-0.4Mbps-400000.m3u8",
          "width": 480,
          "mediaType": "hls_manifest_270_400000",
          "height": 270
        },
        {
          "path": "<vod-destinationbucket>/sources/<source_guid>/hls/<hls_name>_640x360p-0.6Mbps-600000.m3u8",
          "bitRate": "600000",
          "cdnUrl": "https://<server>/sources/<source_guid>/hls/<hls_name>_640x360p-0.6Mbps-600000.m3u8",
          "filePath": "<source_guid>/hls/<hls_name>_640x360p-0.6Mbps-600000.m3u8",
          "width": 640,
          "mediaType": "hls_manifest_360_600000",
          "height": 360
        },
        ......
      ],
      "hlsName": "<hls_name>.m3u8",
      "cdnUrl": "https://<server>/sources/<source_guid>/hls/<hls_name>.m3u8",
      "filePath": "<source_guid>/hls/<hls_name>.m3u8",
      "hlsPath": "<vod-destinationbucket>/sources/<source_guid>/hls/<hls_name>.m3u8"
    },
    "hasDash": true,
    "dash": {
      "destBucket": "<vod-destinationbucket>",
      "mediaType": "dash_master",
      "guid": "<source_guid>",
      "variants": [
        {
          "width": 1280,
          "mediaType": "dash_playlist_720_2500000",
          "bitRate": 2500000,
          "cdnUrl": "https://<server>/sources/<source_guid>/dash/<dashName>_720pinit.mp4",
          "height": 720,
          "filePath": "<source_guid>/dash/<dashName>_720pinit.mp4"
        },
        {
          "width": 940,
          "mediaType": "dash_playlist_540_1900000",
          "bitRate": 1900000,
          "cdnUrl": "https://<server>/sources/<source_guid>/dash/<dashName>_540pinit.mp4",
          "height": 540,
          "filePath": "<source_guid>/dash/<dashName>_540pinit.mp4"
        },
        {
          "width": 640,
          "mediaType": "dash_playlist_360_1200000",
          "bitRate": 1200000,
          "cdnUrl": "https://<server>/sources/<source_guid>/dash/<dashName>_360pinit.mp4",
          "height": 360,
          "filePath": "<source_guid>/dash/<dashName>_360pinit.mp4"
        },
        ....
      ],
      "cdnUrl": "https://<server>/sources/<source_guid>/dash/<dashName>.mpd",
      "filePath": "<source_guid>/dash/<dashName>.mpd",
      "dashPath": "<vod-destinationbucket>/sources/<source_guid>/dash/sources/<dashName>.mpd",
      "dashName": "<dashName>.mpd"
    },
    "hasMp4": true,
    "mp4": [
      {
        "size": 208614602,
        "fileName": "<dashName>_360p.mp4",
        "mediaType": "mp4_output_360",
        "guid": "<source_guid>",
        "bitRate": 1302538,
        "width": 640,
        "height": 360,
        "cdnUrl": "https://<server>/sources/<source_guid>/mp4/<dashName>_360p.mp4",
        "filePath": "<source_guid>/mp4/<dashName>_360p.mp4",
        "bucket": "<vod-destinationbucket>",
        "key": "<vod-destinationbucket>/sources/<source_guid>/mp4/<dashName>_360p.mp4",
        "duration": 1281.28
      },
      {
        "size": 416783534,
        "fileName": "<dashName>_720p.mp4",
        "mediaType": "mp4_output_720",
        "guid": "<source_guid>",
        "bitRate": 2602294,
        "width": 1280,
        "height": 720,
        "cdnUrl": "https://<server>/sources/<source_guid>/mp4/<dashName>_720p.mp4",
        "filePath": "<source_guid>/mp4/<dashName>_720p.mp4",
        "bucket": "<vod-destinationbucket>",
        "key": "<vod-destinationbucket>/sources/<source_guid>/mp4/<dashName>_720p.mp4",
        "duration": 1281.28
      }
    ],
    "hasThumbs": true
  }
}