Live API: VOD from Live Event

Product(s)
Video Cloud
Live
Role(s)
API Developer
Topic(s)
Live Streaming
API(s)
Live API
Type
Support Doc

In this topic, you will learn how to create a video-on-demand (VOD) from a live steaming 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.

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.
  • If the live event duration is greater than 24 hours, only the final 24 hours will be captured in the VOD>

Implementation

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:
    {
        "live_stream": true,
        "region": "us-west-2",
        "reconnect_time": 2400,
        "live_dvr_sliding_window_duration": 30,
        "videocloud": {
      		"video": {
      			"name": "test_live_stream"
      		}
      	}...

    In this case, there is no ingest object inside the videocloud object, because nothing will be ingested.

  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"
          } 
      ]
    }

To have a VOD version of the event saved to your Video Cloud account, include a version of the highlightoutput below.

{
    "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 (if you are not sure, see the introductory paragraph on this page). 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 highlight 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"
        }]
    }
    ]
}

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).