Limited Availability - Do not share this document

This page has moved - you will be directed to the new location in 3 seconds. Please update your bookmarks!

Live API: VOD from Live Event

In this topic, you will learn how to create a video-on-demand (VOD) from a live streaming event after the event is complete.

Introduction

For shorter live streaming events, you may want to make a recording of the event available as a video-on-demand (VOD) in your Video Cloud account after the event has completed. You can easily do this by adding some configuration for the VOD when you create your live job.

Fast Live to VOD allows for clips to be published quickly with segment accuracy while a backend process that's fully transparent to the customer will clean up the clip boundaries and re-publish.

The result is a faster time to market with a clip that will automatically re-publish with the desired clip boundaries.

Important:

  • When the live streaming event is complete, stop your encoder, but do not cancel the job. Wait until the VOD clip has been created before cancelling the job, or it will not be created successfully.
  • Creation of the VOD will not begin until the reconnect_time for the live job has expired.
  • If the live event duration is greater than 24 hours, only the final 24 hours will be captured in the VOD.

Fast VOD option

The fast VOD option allows you to get the VOD version of the live event more quickly. Fast Live to VOD will publish (using a transmux) of live renditions which will be segment accurate.

The the output fields for fast VOD are:

  • live_to_vod set to true
  • mode (required for fast VOD) - for fast VOD, the value will be instant
  • playlist_label (optional) - Only applicable for instant mode VODs. Indicates which playlist to use to create a VOD output (from the live job). Only necessary if custom playlists were defined at live job creation.

Implementations

When you create the live job

The simplest way to implement live to VOD is to include the "live_to_vod": true field in the request body when you create the job, either in:

  • the top-level videocloud object (to create the VOD as a remote asset)
  • an output object that outputs to Video Cloud or to S3

Send to Video Cloud

Note that there are two ways that videocloud objects are used when you create a new live job:

  1. Including videocloud in the job-level fields will create a video in the Video Cloud account which will take the live stream as a remote asset, and create the VOD in your Video Cloud library:
    {
        "live_stream": true,
        "region": "us-west-2",
        "reconnect_time": 2400,
        "live_dvr_sliding_window_duration": 30,
        
          "videocloud": {
            "video": {
              "name": "test_live_stream"
            },
            "live_to_vod": true
            }
        
  2. Including the videocloud object in the properties of an outputs clip or full VOD object will create a Video Cloud video for the clip - the clip is ingested into Video Cloud and becomes part of the VOD library:

    {
      "live_stream": true,
      "region": "us-west-2",
      "reconnect_time": 2400,
      "live_dvr_sliding_window_duration": 30,
    	"videocloud": {
    		"video": {
    			"name": "test_live_stream"
    		}
    	},
      "outputs": [
        { "videocloud": {
            "video": {
                "name": "video name",
            },
            "ingest": {
                "profile": "valid-ingest-profile-name"
            }
        },
        "credentials": "USER_VIDEOCLOUD_CREDENTIAL_LABEL"
        }
      ]
    }

    Note: omit the ingest - profile field to use the default ingest profile for the account.

You can also include the videocloud object within an output object (in this case you do not need to live_to_vod field):

{
  "live_stream": true,
  "region": "us-west-2",
  "reconnect_time": 600,
  "ad_insertion": false,
  "outputs": [
    { OTHER_JOB_OUTPUT_OBJECT },
    { OTHER_JOB_OUTPUT_OBJECT_2 },
    { "videocloud": {
        "video": {
            "name": "video name",
            "description": "video description",
            "long_description": "long description",
            "tags": [
            "tag1", "tag2"
            ],
            "schedule":
            { "starts_at": "2017-01-01T12:00:00-04:00", "ends_at": "2099-01-01T12:00:00-04:00" }
            ,
            "custom_fields": {
                "someCustomField": "value"
            },

        },
        "ingest": {
            "profile": "valid-ingest-profile-name"
        }
    },
    "credentials": "USER_VIDEOCLOUD_CREDENTIAL_LABEL"
    } 
  ]
}

Note that for the video metadata, you can include any fields listed for the Create Video operation of the CMS API.

Ingest profiles define the renditions that will be created for the VOD. For valid-ingest-profile-name, you can substitute the name of any custom or standard ingest profile for your account. What standard profiles you have depends on whether or not your account is enabled for Dynamic Delivery. See the Standard Ingest Profiles for Dynamic Delivery and Context Aware Encoding or the Standard Ingest Profiles for Legacy Transcoding.

Send to S3

To have a VOD version of the event saved to your S3 bucket, include a version of the highlighted output below.

{
  "live_stream": true,
  "region": "us-west-2",
  "reconnect_time": 600,
  "ad_insertion": false,
  "outputs": [
    { OTHER_JOB_OUTPUT_OBJECT },
    { OTHER_JOB_OUTPUT_OBJECT_2 },
    {
      "url":"s3://YOUR_BUCKET/path/filename.mp4",
      "credentials": "YOUR_CREDENTIAL_LABEL",
      "notifications": [
        {
          "url": "http://httpbin.org/post?vodStateChange"
        },
        {
          "url": "http://httpbin.org/post?vodFinished",
          "event": "output_finished"
        }
      ]
    }
  ]
}

Create the VOD as an open-ended video clip

An alternative way to get a VOD for a live event is to Create a VOD Clip with no end time. See the clipping document for full details.

Limitations

  • If you stop (cancel) the live job before the VOD has been created, it will not be created. Instead, stop your encoder to initiate creation of the VOD, and wait for that to finish before stopping the job.
  • For Static Entry Point streams only, Live to VOD can not be set to archive the stream on completion.

    Alternatives:

    • Use clipping to archive the full live event as a VOD. The window for clipping will be available for the standard duration after an event or until the next activation of the SEP (whichever is shorter).