Back up transcoding
Livepeer Studio routes your live streams to the nearest available Livepeer node to ensure your streamers and live stream viewers have a consistent, high quality experience with the minimum latency Livepeer Studio can provide.
These globally-optimized URLs are the best option for nearly all Livepeer Studio users.
- Stream into:
rtmp://rtmp.livepeer.studio/live/[stream-key]
- Playback from:
https://livepeercdn.com/hls/[playbackId]/index.m3u8
Back-up transcoding with regional ingest and playback URLs
To leverage back-up transcoding, you must create two streams, each with a unique
streamKey.
Then, instead of streaming into the global ingest URL above, you'll
point one stream towards a specific region's ingest data center and the other
stream towards a different region's ingest data center.
While more control can be helpful, there are downsides to forgoing the global ingest and playback URLs and selecting a regional URL pair.
- Increased latency: If you stream into a regional ingest URL, Livepeer
Studio routes the stream to that region's data center for ingest. Playback
also originates in that data center. Suppose the live streamer is far away
from that data center region. In that case, this will introduce latency that
could have been avoided if they streamed into the global ingest URL,
rtmp://rtmp.livepeer.studio/live/
. Additionally, distant live stream viewers will have a more latent experience than if the stream was ingested via the global URL. - Riskier during unforeseen outages: On the rare occasion that a Livepeer
Studio ingests data center goes entirely offline. All active live streams into
that data center region will need to restart their streams using a different
regional ingest URL ... and send all their livestream viewers a different
regional playback URL. This could be a bad user experience for your stream
viewers. the stream was ingested via the global ingest URL,
rtmp://rtmp.livepeer.studio/live/
, the playback URL would stay the same even if the livestream had to reconnect.
If you opt out of the global, ingest and playback URLs and use regional. URL pairs, here's what you need to know.
- You can not use the same stream key to connect to multiple regional ingest URLs simultaneously. For simultaneous back-up stream transcoding, create multiple unique stream keys.
- Stream into:
rtmp://[region]-rtmp.livepeer.studio/live/[stream-key]
. - Playback from:
https://[region]-cdn.livepeer.studio/hls/[playbackId]/index.m3u8
.
An RTMP ingest and playback URL pair API hardware in different parts of the world. Each region is three letters, the airport code of the server location. Use the ingest and playback URL pair in the area closest to your broadcaster. For any stream session, you must use the RTMP ingest URL and playback URL pair from the same place.
Request
Find the closest ingest data center
curl "https://livepeer.studio/api/ingest"
Response
Returns the ingest data center region
- 200 OK
- Content-Type: application/json
[
{
ingest: "rtmp://{nearbyRegion}-rtmp.livepeer.studio/live",
playback: "https://{nearbyRegion}-cdn.livepeer.studio/hls"
}
];
Request
You will sometimes want to use a base URL pair of a region different from the
one closest to you. You can get a list of all base URL pairs by calling
https://livepeer.studio/api/ingest?first=false
.
curl "https://livepeer.studio/api/ingest?first=false"
Response
Return a list of all regional base URL pairs
- 200 OK
Content-Type: application/json
[
{
"ingest":"rtmp://{region-1}-rtmp.livepeer.studio/live",
"playback":"https://{region-1}-cdn.livepeer.studio/hls",
"base":"https://{region-1}-cdn.livepeer.studio"
},
{
"ingest":"rtmp://{region-2}-rtmp.livepeer.studio/live",
"playback":"https://{region-2}-cdn.livepeer.studio/hls",
"base":"https://{region-2}-cdn.livepeer.studio"
},
{
"ingest":"rtmp://{region-3}-rtmp.livepeer.studio/live",
"playback":"https://{region-3}-cdn.livepeer.studio/hls",
"base":"https://{region-3}-cdn.livepeer.studio"
}
]