Create a stream
curl --request POST \
--url https://livepeer.studio/api/stream \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "test_stream",
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"playbackPolicy": {
"type": "public",
"webhookId": "<string>",
"webhookContext": {}
},
"profiles": [
{
"width": 129,
"name": "720p",
"height": 129,
"bitrate": 401,
"fps": 1,
"fpsDen": 2,
"gop": "<string>",
"profile": "H264Baseline",
"encoder": "h264"
}
],
"record": true,
"multistream": {
"targets": [
{
"id": "PUSH123",
"profile": "720p"
}
]
}
}'
[
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_stream",
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"lastSeen": 1587667174725,
"sourceSegments": 1,
"transcodedSegments": 2,
"sourceSegmentsDuration": 1,
"transcodedSegmentsDuration": 2,
"sourceBytes": 1,
"transcodedBytes": 2,
"ingestRate": 1,
"outgoingRate": 2,
"isActive": true,
"isHealthy": true,
"issues": [
"<string>"
],
"createdByTokenName": "<string>",
"createdAt": 1587667174725,
"parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"streamKey": "hgebdhhigq",
"playbackId": "eaw4nk06ts2d0mzb",
"playbackPolicy": {
"type": "public",
"webhookId": "<string>",
"webhookContext": {}
},
"profiles": [
{
"width": 129,
"name": "720p",
"height": 129,
"bitrate": 401,
"fps": 1,
"fpsDen": 2,
"gop": "<string>",
"profile": "H264Baseline",
"encoder": "h264"
}
],
"record": true,
"multistream": {
"targets": [
{
"id": "PUSH123",
"profile": "720p"
}
]
},
"suspended": true
}
]
Authorizations
Bearer api-key
Body
Whether the playback policy for a asset or stream is public or signed
Should this stream be recorded? Uses default settings. For more customization, create and configure an object store.
Response
Duration of all the source segments, sec
Duration of all the transcoded segments, sec
Rate at which sourceBytes increases (bytes/second)
Rate at which transcodedBytes increases (bytes/second)
If currently active
Indicates whether the stream is healthy or not.
A string array of human-readable errors describing issues affecting the stream, if any.
Name of the token used to create this object
Timestamp (in milliseconds) at which stream object was created
Points to parent stream object
Used to form RTMP ingest URL
Used to form playback URL
Whether the playback policy for a asset or stream is public or signed
Should this stream be recorded? Uses default settings. For more customization, create and configure an object store.
If currently suspended
Was this page helpful?
curl --request POST \
--url https://livepeer.studio/api/stream \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "test_stream",
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"playbackPolicy": {
"type": "public",
"webhookId": "<string>",
"webhookContext": {}
},
"profiles": [
{
"width": 129,
"name": "720p",
"height": 129,
"bitrate": 401,
"fps": 1,
"fpsDen": 2,
"gop": "<string>",
"profile": "H264Baseline",
"encoder": "h264"
}
],
"record": true,
"multistream": {
"targets": [
{
"id": "PUSH123",
"profile": "720p"
}
]
}
}'
[
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_stream",
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"lastSeen": 1587667174725,
"sourceSegments": 1,
"transcodedSegments": 2,
"sourceSegmentsDuration": 1,
"transcodedSegmentsDuration": 2,
"sourceBytes": 1,
"transcodedBytes": 2,
"ingestRate": 1,
"outgoingRate": 2,
"isActive": true,
"isHealthy": true,
"issues": [
"<string>"
],
"createdByTokenName": "<string>",
"createdAt": 1587667174725,
"parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"streamKey": "hgebdhhigq",
"playbackId": "eaw4nk06ts2d0mzb",
"playbackPolicy": {
"type": "public",
"webhookId": "<string>",
"webhookContext": {}
},
"profiles": [
{
"width": 129,
"name": "720p",
"height": 129,
"bitrate": 401,
"fps": 1,
"fpsDen": 2,
"gop": "<string>",
"profile": "H264Baseline",
"encoder": "h264"
}
],
"record": true,
"multistream": {
"targets": [
{
"id": "PUSH123",
"profile": "720p"
}
]
},
"suspended": true
}
]