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.parameter | type | description |
---|---|---|
createdAt | number | Timestamp when the asset was created. Reported in Unix epoch time. |
createdByTokenName | string | Livepeer.com user-assigned name for the API key that created the stream object. |
id | string | Unique 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. |
isActive | boolean | True if the asset is active. An active livestream means segments are being ingested. |
kind | string | Livepeer.com API object type. |
lastSeen | number | Timestamp when the asset was last active. Reported in Unix epoch time. An active livestream means segments are being ingested. |
name | string | Additional identifier for the asset. Often set to a human readable string. This identifier does not need to be unique. Required with POST |
parentId | string | Only 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. |
playbackId | string | Unique identifier used to form the playback URL. |
profiles | array | Transcoding 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.bitrate | integer | bit/s setting for the transcoded rendition (minimum: 400). |
profiles.fps | integer | 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 (minimum: 0). |
profiles.height | integer | Pixel height setting for the transcoded rendition (minimum: 128). |
profiles.name | string | Identifier for the transcoded rendition settings (minLength: 1, maxLength: 500). |
profiles.width | integer | Pixel width setting for the transcoded rendition. (minimum: 128). |
multistream | object | Multistream configuration. |
multistream.targets | array | List of Multistream Targets where this stream should be simultaneously pushed to. |
multistream.targets.profile | string | Name of profile that should be pushed to the referenced Multistream Target. Use "source" to push original media as ingested. |
multistream.targets.videoOnly | boolean | If true , the stream audio will be muted and only silent video will be pushed to the target. |
multistream.targets.id | string | Unique identifier of the Multistream Target object from its own API. |
multistream.targets.spec | object | This 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. |
record | boolean | true 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. |
suspended | boolean | Default 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. |
sourceSegments | number | Number of asset source segments processed. |
sourceSegmentsDuration | number | Duration in seconds of asset source processed. |
streamKey | string | Unique secret key used to form the RTMP ingest URL. |
transcodedSegments | number | Number of transcoded rendition segments processed. Should be (sourceSegments * number of profiles). |
transcodedSegmentsDuration | number | Duration in seconds of transcoded renditions processed. Should be (sourceSegmentsDuration * number of profiles). |
userId | string | Unique identifier for the Livepeer.com user account that created the stream object. |