beta/
docs
/
overview
OverviewGuidesAPI Reference
Log inSign up
beta/
docs
/
overview
OverviewGuidesAPI Reference
Sign upLogin
Guides
Getting started with Livepeer.com
Live stream with the Livepeer.com API
Overview
Verify stream is live
Live stream with the Livepeer.com dashboard
Your Livepeer.com account

How to verify stream status with the Livepeer.com API

To verify a stream is running, you can fetch the stream status by sending a GET request to https://livepeer.com/api/stream/ with the stream object id appended. You received the id in the response when you created a stream object.

Here is an example request:

curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.com/api/stream/{id}"

This is an example response:

{
"name":"test_stream",
"profiles":[
{"bitrate":2000000,"fps":30,"height":720,"name":"720p","width":1280},
{"bitrate":1000000,"fps":30,"height":480,"name":"480p","width":854},
{"bitrate":500000,"fps":30,"height":360,"name":"360p","width":640}],
"id":"2d10f1fd-dbf7-495b-8aef-08916507fcce",
"createdAt":1596118509635,
"isActive":true,
"lastSeen":1596119750455
}

isActive: true means video segments are currently being ingested by Livepeer.com. isActive: false means the live stream is idle and no video segments are currently being ingested by Livepeer.com.

lastSeen represents when the stream was last observed by the monitoring system. The time is reported in Unix epoch time. If the stream is running, the epoch will be close to the current time.

Return all active livestreams

Exclude child-session objects

curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.com/api/stream?streamsonly=1&filters=[{"id": "isActive", "value": true}]"

Return all idle livestreams

Exclude child-session objects

curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.com/api/stream?streamsonly=1&filters=[{"id": "isActive", "value": false}]"

Next, learn how to playback a live stream with the Livepeer.com API.

Livepeer.com
beta
  • Company
  • Home
  • Contact
  • Team
  • Jobs
  • Livepeer, Inc.
  • 223 Bedford Ave PMB 530
    Brooklyn, NY 11211
  • hello@livepeer.com