Livepeer Video Services

The stream object

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

A Livepeer.com stream is a unique object with configuration data and metadata about all live stream sessions associated with it.

The 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.

Note: historically, a stream object with a parentId represented 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.
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.
namestringAdditional identifier for the asset. Often set to a human readable string. This identifier does not need to be unique. Required with POST
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.bitrateintegerbit/s setting for the transcoded rendition (minimum: 400).
profiles.fpsintegerFramerate 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 (minimum: 0).
profiles.heightintegerPixel height setting for the transcoded rendition (minimum: 128).
profiles.namestringIdentifier for the transcoded rendition settings (minLength: 1, maxLength: 500).
profiles.widthintegerPixel width setting for the transcoded rendition. (minimum: 128).
multistreamobjectMultistream configuration.
multistream.targetsarrayList of Multistream Targets where this stream should be simultaneously pushed to.
multistream.targets.profilestringName of profile that should be pushed to the referenced Multistream Target. Use "source" to push original media as ingested.
multistream.targets.videoOnlybooleanIf true, the stream audio will be muted and only silent video will be pushed to the target.
multistream.targets.idstringUnique identifier of the Multistream Target object from its own API.
multistream.targets.specobjectThis field is write-only, allowed only in mutation request payloads. It specifies an inline Multistream Target object to be created on the same time as the stream creation or update. Reference the specific Multistream Target API for schema.
recordbooleantrue means that new sessions are recorded and false means they are not. The value is also inherited by all future child session objects, which are read-only. Historically, stream objects can also represent a single live stream session, in which case they have a parentId. In that case, 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.
suspendedbooleanDefault value is false. Can be used to forcefully stop any live stream sessions happening in the current stream resource. Set to true to immediately suspend any running stream and prohibit new streams from starting.
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 transcoded rendition segments processed. Should be (sourceSegments * number of profiles).
transcodedSegmentsDurationnumberDuration in seconds of transcoded renditions processed. Should be (sourceSegmentsDuration * number of profiles).
userIdstringUnique identifier for the Livepeer.com user account that created the stream object.