Adding a Live Stream

When you add a live stream, you receive URLs from Ooyala that you configure in your encoder.

Note: Backlot Live streaming has been deprecated and is scheduled to be disabled. For details and alternatives, see the OVP Release Notes.

For the highest quality streaming, specify the encoder IP at the location from which you are broadcasting and make sure that you have enough dedicated bandwidth to encode and serve all of your live streams.

Note: It can take up to 30 minutes for a newly provisioned live stream to be usable.

To add a live stream:

  1. Use the /v2/assets route. In the POST body, set asset_type to live_stream, is_flash to true, and specify the encodings.
    Note: For live streaming to iPhone and iPad (iOS devices), also set is_ios to true.
    The following example creates a live stream with three Flash encodings and iOS live support:
    [POST]/v2/assets{  
       "name":"Flash and iOS Live Stream",
       "asset_type":"live_stream",
       "primary_encoder_ip":"8.8.8.8",
       "password":"encoder_password",
       "is_flash":true,
       "is_ios":true,
       "encodings":[  
          {  
             "width":800,
             "height":600,
             "bitrate":600
          },
          {  
             "width":800,
             "height":600,
             "bitrate":300
          },
          {  
             "width":400,
             "height":300,
             "bitrate":200
          }
       ]
    }

    Backlot returns a response similar to the following.

    {
       "name":"Flash and iOS Live Stream",
       "preview_image_url":null,
       "asset_type":"live_stream",
       "duration":0,
       "embed_code":"FlczhuMzocRFR3YwMD0bxxo7wOtQY8-w",
       "created_at":"2012-03-02T00:42:13+00:00",
       "encodings":[  
          {  
             "bitrate":200,
             "height":300,
             "width":400
          },
          {  
             "bitrate":300,
             "height":600,
             "width":800
          },
          {  
             "bitrate":600,
             "height":600,
             "width":800
          }
       ],
       "is_ios":true,
       "time_restrictions":null,
       "updated_at":"2012-03-02T00:42:15+00:00",
       "hosted_at":null,
       "external_id":null,
       "original_file_name":null,
       "is_flash":true,
       "ios_live_upload_url":"http://post.ooyala-i.akamaihd.net/201184/1dayarchive/ VpNDqXTEbTE_5UgsKdpQcDjcJATg/FlczhuMzocRFR3YwMD0bxxo7wOtQY8-w/master.m3u8",
       "ios_live_delivery_url":"http://ooyala-i.akamaihd.net/hls/live/201184/1dayarchive/ VpNDqXTEbTE_5UgsKdpQcDjcJATg/FlczhuMzocRFR3YwMD0bxxo7wOtQY8-w/master.m3u8",
       "backup_entry_point":"rtmp://b.ep54802.i.akamaientrypoint.net/EntryPoint",
       "primary_entry_point":"rtmp://p.ep54802.i.akamaientrypoint.net/EntryPoint",
       "description":null,
       "status":"live"
    }
    Note: Try out the code samples using your account credentials in the Ooyala Scratchpad. To launch the Scratchpad, go to Ooyala API Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad.
  2. For setup in your encoder, for Flash, note the primary_entry_point and backup_entry_point.
  3. For setup in your encoder, for iOS, note the ios_live_upload_url and ios_live_delivery_url.
    The values of these properties have the following formats. The pcode is your provider code or account identifier (for details, see Your API Credentials). The embedCode is the embed code or content ID for the live stream. Also shown are the corresponding field names on the Spinnaker.
    Table 1.
    Property AKA On Spinnaker Example or Format
    primary_entry_point   Server Location URL rtmp://p.ep54802.i.akamaientrypoint.net/EntryPoint
    backup_entry_point     rtmp://b.ep54802.i.akamaientrypoint.net/EntryPoint
    ios_live_upload_url Publish URL Storage URL http://post.ooyala-i.akamaihd.net/201184/1dayarchive/pcode/embedCode/master.m3u8
    ios_live_delivery_url Delivery URL Publishing URL http://ooyala-i.akamaihd.net/hls/live/201184/1dayarchive/pcode/embedCode/master.m3u8

The live stream is successfully added.

Was this article helpful?