Create

Create a new live stream.

This action requires a request with an active account.

Tokens

This action requires the following tokens:

  • livestream-create

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
title String   The name for this live stream
description String   The description for this live stream
type Label   The type of this live stream
protected Boolean   Whether this live stream is only accessible using signed requests. If not provided, use the account default
source URL  

Source of this live stream if it must be retrieved from an external source; must be a valid URL

This argument can be unset by providing an empty string

accessuser String   User required for accessing this live stream’s source
accesspassword String   Password required for accessing this live stream’s source
sourceproxy URL   Proxy for accessing this stream’s source
securityprofile Hash   The security profile for this live stream
fallbackitem Hash   The fallback item for this live stream
externallink URL   A link where this livestream can be found (i.e. where the video is embedded)
archivingsegmentduration Duration   The duration of each archiving segment. Can be set in multiples of 30 minutes, and can be no more than 24 hours. If not given, archiving will be disabled. This argument is only available for generic live streams (both push and pull).
dvrwindowlength Duration   The period available for rewinding playback using DVR. Can be set in whole minutes only, and can be no more than 24 hours. If not given, DVR will be disabled. This argument is only available for generic live streams (both push and pull).

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash Livestream ID
title String Title of the live stream
description String Description of the live stream
type

The type of this live stream

The value of this field is an object containing the following fields:

Name Type Description
label Label Livestream type label
name String The name of this livestream type
protected Boolean True if authentication must be applied to viewing links for this live stream, otherwise false
accessuser String Username to access this livestream
accesspassword String Password to access this livestream
datecreated DateTime When this livestream was created
datemodified DateTime When this livestream was last updated
source String Source URL of this live stream if it must be retrieved from an external source
sourceproxy String The proxy to get to the live strem source, if any
active Boolean True if the live stream is active; if active, it is possible for a source to start streaming to the publishing point for this live stream
securityprofile

Security profile

The value of this field is an object containing the following fields:

Name Type Description
id Hash Security profile ID
name String The name of this security profile
state

Current state of this live stream

The value of this field is an object containing the following fields:

Name Type Description
isstreaming Boolean Whether this live stream is currently streaming
nrconnectedusers Integer The total number of currently connected users; not set if isstreaming is false
currenttitle String Current or last known title, if one has ever been set
currentbitrate Integer Current or last known bitrate, if this stream has ever been used
datestatemodified DateTime When the state of this live stream was last changed
availability String The current availability of the live stream, as one of ‘offline’, ‘starting’, ‘online’, or ‘interrupted’. This field will always be included for generic live streams (both push and pull), and never for other types.
thumbnail String Path of the thumbnail of this livestream
medialink

The URLs at which this livestream is available for streaming

The value of this field is an object containing the following fields:

Name Type Description
http String The URL at which this livestream can be streamed using HTTP streaming (ICEcast), if this livestream supports it
rtmp String The URL at which this livestream can be streamed using RTMP, if this livestream supports it
hls String The URL at which this livestream can be streamed using HLS (HTTP Live Streaming), if this livestream supports it
dash String The URL at which this livestream can be streamed using MPEG-DASH, if this livestream supports it
smooth String The URL at which this livestream can be streamed using Smooth Streaming, if this livestream supports it
hds String The URL at which this livestream can be streamed using HTTP Dynamic Streaming, if this livestream supports it
publishlink

The URLs to which one should publish this livestream

The value of this field is an object containing the following fields:

Name Type Description
http String The URL to which can be published using HTTP streaming (ICEcast), if this livestream supports it
rtmp String The URL to which can be published using RTMP, if this livestream supports it
smooth String The URL to which can be published using Fragmented MP4 (ISMV / Smooth Streaming), if this livestream supports it
externallink String A link to an external page, such as a page containing more information about this livestream, or the page where this livestream is embedded
fallbackitem

Fallback item of this livestream, if any

The value of this field is an object containing the following fields:

Name Type Description
id Hash Item ID
title String Title of the item
description String Description of the item
type Label The type of this item; for available item types, refer to the documentation of the Item command
account

The account that created this item

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
datecreated DateTime When this item was created; for recordings of live-events, this is the date when the item finished recording
account

Account for this live stream

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
archiving Boolean Whether archiving is enabled for this live stream. This field will always be included for generic live streams (both push and pull), and never for other types.
archivingsegmentduration Duration The duration of each archive segment. This field will always be included if the field ‘archiving’ is present and true, and never otherwise.
dvr Boolean Whether DVR is enabled for this live stream. This field will always be included for generic live streams (both push and pull), and never for other types.
dvrwindowlength Duration The period available for rewinding playback in DVR. This field will always be included if the field ‘dvr’ is present and true, and never otherwise.

Errors

This action will always return one of the default status codes.