Live Streams

Live streaming is the delivery of video content in real time.

Note: For more information about Backlot REST API commands, see the Backlot API Reference.

Live streams consist of content creation and encoding, content delivery through a CDN, and content consumption through Internet-connected devices. Backlot manages the set up, publishing rules, and monetization of your live streams.

To set up a live stream with Ooyala, you only need a video camera, an Internet connection, and an encoder. Popular encoders include hardware encoders such as Inlet Spinnaker HD and software encoders such as Flash Media Live (free).

If live streaming is not enabled on your account, contact Sales, your Customer Success Manager, or Technical Support.

This example creates a live stream with three encodings.

Note: This example uses the property primary_encoder_ip, which is for non-RTMP streams. For RTMP streams, the properties are primary_entry_point and backup_entry_point.
[POST]/v2/assets{  
   "name":"Extreme Working at My Desk",
   "asset_type":"live_stream",
   "primary_encoder_ip":"8.8.8.8",
   "password":"encoder_password",
   "is_flash":true,
   "is_ios":false,
   "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:

{  
   "asset_type":"live_stream",
   "duration":0,
   "name":"Extreme Working at My Desk",
   "preview_image_url":null,
   "created_at":"2011-06-06T18:15:00+00:00",
   "embed_code":"ZnbWVpMjqToT1W_zYtCep5Ew0bEGmRgx",
   "time_restrictions":null,
   "updated_at":"2011-08-10T00:47:46+00:00",
   "external_id":null,
   "hosted_at":null,
   "original_file_name":null,
   "description":null,
   "is_flash":true,
   "is_ios":false,
   "status":"live",
   "encodings":[  
      {  
         "width":800,
         "height":600,
         "bitrate":300
      },
      {  
         "width":800,
         "height":600,
         "bitrate":600
      }
   ]
}
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

해당 내용이 도움 되었습니까?