Verify a live stream is active
The easiest way to confirm a live stream is active is to login to the Livepeer
Studio Dashboard, navigate to the Streams page,
livepeer.studio/dashboard/streams,
and click on a stream name. Look at the Status row to see if the stream is
Active or Idle. If the status Idle, that means that Livepeer Studio is not
ingesting any video with that stream’s streamKey
.
Make a GET
request to https://livepeer.studio/api/stream/{id}
, and note the
value of isActive
in the response. true
means the stream
is active, and
Livepeer Studio is ingesting video with that stream’s streamKey
. false
means
that Livepeer Studio is not ingesting any video with that streamKey
.
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.
Here is an example request:
curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.studio/api/stream/{id}"
This is an example response:
{
"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",
"isActive":"true",
"lastSeen":1596119750455",
{other asset object keys}
}
This example shows a decoded JSON object. But, remember that anything passed as
a parameter in a GET
request URL must be URL encoded.
curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.studio/api/stream?streamsonly=1&filters=[{"id": "isActive", "value": true}]"
This example shows a decoded JSON object. Remember that anything passed as a
parameter in a GET
request URL must be URL encoded.
curl -H 'authorization: Bearer {api-key}' \
"https://livepeer.studio/api/stream?streamsonly=1&filters=[{"id": "isActive", "value": false}]"