/

docs

Log inSign up
GuidesAPI Reference

CONTENT

Overview

stream

The stream object

POST create a stream

GET retrieve a stream

PATCH turn on/off recording

GET list of all streams

session

Ingest

Authentication

Errors

API key

#The stream object

The stream object is the core building block of the Livepeer.com platform.

A Livepeer.com stream is a unique object with configuration data and metadata about all live stream sessions associated with it. Historically, a stream object with a parentId represents a single live stream session. This type of "child-session" stream object will be deprecated in an upcoming version of the API in favor of the session object.

stream object parameters associated with configuration settings are read-write, for example changing the record value to turn recording on or off for future sessions.

Other stream object parameters are read only. These include the unique id, ingested sourceSegments and duration data, among others.

#Attributes

JSON parameterTypeDescription
createdAtnumberTimestamp when the asset was created. Reported in Unix epoch time.
createdByTokenNamestringLivepeer.com user-assigned name for the API key that created the stream object.
idstringUnique identifier for the stream. Historically, this could also represent a single live stream session. This type of "child-session" stream object will be deprecated in an upcoming version of the API in favor of the session object.
isActivebooleanTrue if the asset is active. An active livestream means segments are being ingested.
kindstringLivepeer.com API object type.
lastSeennumberTimestamp when the asset was last active. Reported in Unix epoch time. An active livestream means segments are being ingested.
namestringRequired with POST
Additional identifier for the asset. Often set to a human readable string. This identifier does not need to be unique.
parentIdstringOnly used on stream objects that represent a single live stream session. Points to a parent stream object. This type of "child-session" stream object will be deprecated in an upcoming version of the API in favor of the session object.
playbackIdstringUnique identifier used to form the playback URL.
profilesarrayTranscoding rendition settings. The source will be delivered with the renditions in the HLS and does not need to be redefined in the profiles parameter. If no profiles are defined, only the source will be delivered for playback.
profiles..bitrateintegerminimum: 400
kbit/s setting for the transcoded rendition.
profiles..fpsintegerminimum: 0
Framerate setting for the transcoded rendition. When set to 0, the source framerate is adopted for the transcoded rendition framerate. All profiles for a source object must be configured with the same fps.
profiles..heightintegerminimum: 128
Pixel height setting for the transcoded rendition.
profiles..namestringminLength: 1, maxLength: 500
Identifier for the transcoded rendition settings.
profiles..widthintegerminimum: 128
Pixel width setting for the transcoded rendition.
record booleantrue means that new sessions are recorded, and false means they are not. Historically, on stream objects with a parentId (stream objects representing a single live stream session), the value is read-only; true means that the session is actively being recorded or was recorded, and false means that the session is not being recorded or was not recorded.
sourceSegmentsnumberNumber of asset source segments processed.
sourceSegmentsDurationnumberDuration in seconds of asset source processed.
streamKeystringUnique secret key used to form the RTMP ingest URL.
transcodedSegmentsnumberNumber of asset transcoded rendition segments processed. Should be (sourceSegments * number of profiles).
transcodedSegmentsDurationnumberDuration in seconds of asset transcoded renditions processed. Should be (sourceSegmentsDuration * number of profiles).
userIDstringUnique identifier for the Livepeer.com user account that created the stream object.