支持 聯繫支持 | 系統狀況 系統狀態
頁面內容

    動態攝取通知

    在本主題中,您將了解有關使用 Dynamic Ingest API.

    Dynamic Ingest API 通知

    您可以指定一個或多個回調URL,以接收有關提取過程結果的通知。 您指定的網址應適用於可以接受POST請求的應用。 通知將以JSON格式發送。

    格局

    這是一個例子。

    • pub ID 57838016001的用戶
    • 想要使用Dynamic Ingest上傳位於https://s3.amazonaws.com/bucket/mysourcevideo.mp4的源視頻文件
    • 想要上載目錄中具有視頻ID 5199670523001的現有標題
    • 使用多平台標準靜態配置文件
    • 希望在分別位於http:// host1 / path1和http:// host2 / path2的兩個端點上接收回調

    DI請求看起來像這樣:

    POST請求

    請求正文

        {
          "master": {
            "url": "https://s3.amazonaws.com/bucket/mysourcevideo.mp4"
          },
          "profile": "multi-platform-standard-static",
          "callbacks": ["http://host1/path1”, “http://host2/path2”]
        }

    樣品通知

    通知以POST請求的形式發送,而請求正文中的通知為JSON [1] 。 這是來自典型視頻攝取作業的全套通知:

    {
          "entity": "default\/audio192",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/audio192",
          "language": "en",
          "variant": "main",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/audio64",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/audio64",
          "language": "en",
          "variant": "main",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/audio96",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/audio96",
          "language": "en",
          "variant": "main",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/audio128",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/audio128",
          "language": "en",
          "variant": "main",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "5660367449001",
          "entityType": "DIGITAL_MASTER",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video450",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video450",
          "bitrate": 451,
          "width": 480,
          "height": 270,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "5660367449001",
          "entityType": "TITLE",
          "version": "1",
          "action": "PUBLISH",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "thumbnail",
          "entityType": "ASSET",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "poster",
          "entityType": "ASSET",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video900",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video900",
          "bitrate": 901,
          "width": 640,
          "height": 360,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video700",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video700",
          "bitrate": 700,
          "width": 640,
          "height": 360,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video1200",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video1200",
          "bitrate": 1204,
          "width": 960,
          "height": 540,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video1700",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video1700",
          "bitrate": 1703,
          "width": 960,
          "height": 540,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video3500",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video3500",
          "bitrate": 3498,
          "width": 1920,
          "height": 1080,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video2000",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video2000",
          "bitrate": 2000,
          "width": 1280,
          "height": 720,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "default\/video3800",
          "entityType": "DYNAMIC_RENDITION",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "dynamicRenditionId": "default\/video3800",
          "bitrate": 3804,
          "width": 1920,
          "height": 1080,
          "accountId": "57838016001",
          "status": "SUCCESS"
        }
    {
          "entity": "5660367449001",
          "entityType": "TITLE",
          "version": "1",
          "action": "CREATE",
          "jobId": "d3ef8751-2b88-4141-95d5-83f0393aca07",
          "videoId": "5660367449001",
          "accountId": "57838016001",
          "status": "SUCCESS"
        }

    通知欄

    項目 產品描述
    status FAILED 如果提取或創建引渡不成功, SUCCESS 如果請求成功
    accountId 帳號
    videoId 影片編號
    jobId 動態提取請求的作業ID
    entity 實體名稱或 Video Cloud TITLE的視頻的ID
    entityType 所報告資產的種類-例如:TITLE(視頻),DIGITAL_MASTER,ASSET(格式,字幕文件或圖像)
    bitrate 再現比特率
    width 演繹的幀寬度
    height 渲染的幀高
    errorMessage 解釋為什麼攝取失敗的原因
    version 始終等於的字符串 "1"
    action 發生的動作-例如CREATE

    解釋通知

    包含以下內容的通知 "action": "CREATE""status": "SUCCESS" 表示過程已完成。

    • 如果 entityType is TITLE,則提取視頻的處理完成。
    • entityType: TITLE, action: PUBLISH 是指視頻被激活的時間。 對於立即生效的視頻,此時間與 CREATE 時間。
    • 如果 entityType is ASSET, DYNAMIC_RENDITION or DIGITAL_MASTER,則演示文稿,圖像,清單,WebVTT文件或數字母版已成功添加到您的視頻中。

    頁面最後更新於12年2020月XNUMX日