Skip to main content

Configure broadcast software

This guide provides information on configuring your broadcasting software:

  • Ways to get the streamKey

  • Using the RTMP URL

  • Setting the keyframe intervals

About Broadcasting Configuration

Understanding how to configure the broadcasting software being used so that you able to push an RTMP stream into Livepeer Studio. In order to broadcast a live stream, you’ll need a stream key.

What You Can Build Here

ImplementationDescription
Set up broadcast software configurationConfiguring the settings of the broadcasting software using the RTMP URL long with the stream key
Set up keyframe intervalsAdjusting the keyframe levels for optimizing the stream

Technical Preparation

Before getting started, you can set up your environment to prepare for developing your application:

  • Sign up for a free Livepeer Studio account
  • Get an API key
  • Access the API Reference

Ways to Find Your Stream Key:

Ther are two ways to find the stream key:

  • Via the API
  • Via the dashboard(no code)

Get the stream key using the API

Getting the stream key from creating a stream

Request

When you create a stream object with a POST request to /api/stream

Note: The value of the streamKey in the response.

Response

{
"lastSeen": 0,
"isActive": false,
"record": false,
"suspended": false,
"sourceSegments": 0,
"transcodedSegments": 0,
"sourceSegmentsDuration": 0,
"transcodedSegmentsDuration": 0,
"sourceBytes": 0,
"transcodedBytes": 0,
"profiles": [
{
"name": "720p",
"bitrate": 2000000,
"fps": 30,
"width": 1280,
"height": 720
},
{
"name": "480p",
"bitrate": 1000000,
"fps": 30,
"width": 854,
"height": 480
},
{
"name": "360p",
"bitrate": 500000,
"fps": 30,
"width": 640,
"height": 360
}
],
"name": "test_stream",
"kind": "stream",
"userId": "eada599f-3d58-499b-ba24-c7f3faf988de",
"renditions": {},
"id": "ijkl61f3-95bd-4971-a7b1-4dcb5d39e78a",
"createdAt": 1596081229373,
"streamKey": "abcd-uimq-jtgy-x98v",
"playbackId": "efghb2mxupongp5k",
"createdByTokenName": "test_stream",
"multistream": {
"targets": []
}
}

Getting the stream key from a stream

Request

Make a GET request to /api/stream/[id]

Note The value of thestreamKey in the response.

Reponse

  {
"name":"test_stream",
"profiles":[
{"name":"720p","bitrate":2000000,"fps":30,"width":1280,"height":720},
{"name":"480p","bitrate":1000000,"fps":30,"width":854,"height":480},
{"name":"360p","bitrate":500000,"fps":30,"width":640,"height":360},
],
"id":"ijkl61f3-95bd-4971-a7b1-4dcb5d39e78a",
"createdAt":1596081229373,
"streamKey":"abcd-uimq-jtgy-x98v",
"playbackId":"efghb2mxupongp5k",
{other asset object keys}
}

Get the stream key with Livepeer Studio Dashboard

  • Login to the Livepeer Studio Dashboard, navigate to the streams list page, and click on a stream name. Reveal and copy your secret stream key.

When configuring broadcast software to push streams, use the secret streamKey and the Livepeer Studio RTMP ingest URL, rtmp://rtmp.livepeer.studio/live.

Depending on the software used to push your RTMP stream, you’ll be prompted for the following:

  • Stream Key: In some cases, this is called a "Stream Name." Input your Livepeer Studio streamKey not the name of your stream.
  • Server URL: Input the RTMP ingest URL, rtmp://rtmp.livepeer.studio/live.
  • Location or URL: Input the ingest url with the streamKey appended. For example, rtmp://rtmp.livepeer.studio/live/[streamKey].

Optimization: Set keyframe intervals

Livepeer Studio works best with consistent, short keyframe intervals, ideally 2 seconds.

You should set or encourage your users to set this in their broadcasting software. In OBS, you can set this by going to "Settings" --> "Output", change the "Output Mode" from "Simple" to "Advanced" and set the "Keyframe interval" to 2.