Create a stream
/streams/write Change: creates or edits. Scopes
Create its source first (POST /streams/sources/), then list it in sources with order 0; backups follow with 1, 2… Give category or categories. An always-on stream with a source starts at once; check_state says whether it plays yet.
Body
namestringrequiredcategorystring (uuid)categoriesstring (uuid)[]Every category it is listed under; always holds
category, its main one.bouquetsstring (uuid)[]Bouquets this stream belongs to
sourcesobject[]sourcestring (uuid)requiredorderintegerPriority. 0 = primary. Lower values are tried first.
descriptionstringcan be nullthumbnailstringcan be nullepg_channel_idstringThe guide channel players show for this stream. Blank: no guide.
streaming_enginestringEngine used for video processing
gstreamer- GStreamerffmpeg- FFmpeg
engine_configanyJSON configuration for streaming engine parameters
transcoding_profilestring (uuid)can be nullOptional: converts the stream's picture and sound this way.
allow_passthroughbooleanOn (the default): a source players can play is sent as it is, and one they cannot is converted. Off: the stream is always converted. A transcoding profile always converts.
user_agentstringSent to the source instead of the server's own. Leave empty unless the provider refuses other players.
http_proxystringReach the source through this HTTP proxy, e.g. http://10.0.0.5:3128.
http_headersstringOne "Name: value" per line, e.g. "Referer: https://example.com" or "Cookie: session=abc".
is_activebooleanis_on_demandbooleanStarted when someone watches and stopped once nobody does. Off: it runs all the time.
is_directbooleanSend viewers straight to the source instead of playing it through a server. The line and its rules are still checked, but the source address (and any login in it) is shown to the viewer, there is no connection limit, no live connection row and no backup source.
routing_modestringauto: any streaming server with room plays it (never the panel's own);pinned: the servers ofpinned_serversin order, the next taking over when one fails.auto- Auto load-balance (excludes panel)pinned- Pinned (ordered failover)
pinned_serversobject[]serverstring (uuid)requiredpositionintegerrequiredLower = higher priority. 0 is primary; 1, 2, … are failover targets in order.
auto_eligible_serversstring (uuid)[]sort_orderintegerarchive_daysintegerRecord this channel so viewers can watch what aired in the last this many days (TV archive). 0 = off.
What it costs: the channel runs all the time on the server that records it, so it holds one provider connection permanently, and it uses disk at its own bitrate (about 10.8 GB a day per Mb/s). Recordings are the channel as viewers get it, never re-encoded. Turning it off deletes the recordings.
archive_serverstring (uuid)can be nullThe server that records this channel and plays its catch-up. The channel runs there, so viewers of the live channel are sent there too: one provider connection, not two. If it goes down, the channel moves to another server and recording waits for it.
plananydelayany
Response
201 OK
idstring (uuid)requiredread-onlyxtream_idintegerrequiredread-onlyThe stream's number in players' channel lists. Set when it is created, never changed or reused.
namestringrequiredcategorystring (uuid)category_namestringrequiredread-onlycategoriesstring (uuid)[]Every category it is listed under; always holds
category, its main one.bouquetsstring (uuid)[]Bouquets this stream belongs to
sourcesobject[]sourcestring (uuid)requiredsource_namestringrequiredread-onlysource_urlstring (uri)requiredread-onlysource_healthstringrequiredread-onlysource_health_atstring (date-time)requiredread-onlysource_is_activebooleanrequiredread-onlyorderintegerPriority. 0 = primary. Lower values are tried first.
descriptionstringcan be nullthumbnailstringcan be nulllogo_autobooleanrequiredread-onlyepg_channel_idstringThe guide channel players show for this stream. Blank: no guide.
epg_autobooleanrequiredread-onlyepg_channelobjectrequiredread-onlycan be nullidstringrequiredread-onlynamestringrequiredread-onlyiconstring (uri)requiredread-onlycountriesstring[]requiredread-onlyhas_guidebooleanrequiredread-only
tvg_idstringrequiredread-onlystreaming_enginestringEngine used for video processing
gstreamer- GStreamerffmpeg- FFmpeg
engine_configanyJSON configuration for streaming engine parameters
transcoding_profilestring (uuid)can be nullOptional: converts the stream's picture and sound this way.
transcoding_profile_namestringrequiredread-onlyallow_passthroughbooleanOn (the default): a source players can play is sent as it is, and one they cannot is converted. Off: the stream is always converted. A transcoding profile always converts.
user_agentstringSent to the source instead of the server's own. Leave empty unless the provider refuses other players.
http_proxystringReach the source through this HTTP proxy, e.g. http://10.0.0.5:3128.
http_headersstringOne "Name: value" per line, e.g. "Referer: https://example.com" or "Cookie: session=abc".
is_activebooleanis_stoppedbooleanrequiredread-onlyStopped with Stop: it stays stopped until Start or Restart.
is_on_demandbooleanStarted when someone watches and stopped once nobody does. Off: it runs all the time.
is_directbooleanSend viewers straight to the source instead of playing it through a server. The line and its rules are still checked, but the source address (and any login in it) is shown to the viewer, there is no connection limit, no live connection row and no backup source.
routing_modestringauto: any streaming server with room plays it (never the panel's own);pinned: the servers ofpinned_serversin order, the next taking over when one fails.auto- Auto load-balance (excludes panel)pinned- Pinned (ordered failover)
pinned_serversobject[]serverstring (uuid)requiredserver_instance_idstringrequiredread-onlyserver_namestringrequiredread-onlypositionintegerrequiredLower = higher priority. 0 is primary; 1, 2, … are failover targets in order.
auto_eligible_serversstring (uuid)[]current_serverstring (uuid)requiredread-onlycurrent_sourceobjectrequiredread-onlyidstring (uuid)requiredread-onlynamestringrequiredread-onlyurlstring (uri)requiredread-onlyhealthstringrequiredread-onlyHow the servers last found it:
onlinewhile a server plays from it,downafter one failed to,unknownuntil a server has tried.health_atstring (date-time)requiredread-onlycan be nullWhen a server last said how it found it.
probed_video_codecstringrequiredread-onlye.g. h264, hevc. Empty until a server has read the source.
probed_audio_codecstringrequiredread-onlyprobed_fpsnumberrequiredread-onlycan be nullNull when the source declares a variable or unknown rate.
probed_widthintegerrequiredread-onlycan be nullprobed_heightintegerrequiredread-onlycan be nullprobed_audio_tracksintegerrequiredread-onlycan be nullNumber of audio streams — language alternatives.
probed_atstring (date-time)requiredread-onlycan be nullWhen a server last read these, as a stream started on it.
statusstringrequiredread-onlyonline_sincestring (date-time)requiredread-onlycan be nullWhen the current run started: its uptime counts from here.
live_statsanyrequiredread-onlyWhat the server playing it last reported (fps, video_codec, audio_codec…).
check_statestringrequiredread-onlyWhether the channel proved it plays since it was added. Read-only.
check_detailstringrequiredread-onlyWhy the check failed, in plain words, or what it waits for.
checked_atstring (date-time)requiredread-onlycan be nullsort_orderintegeractive_sessions_countintegerrequiredread-onlyPeople watching it now.
restart_countintegerrequiredread-onlycan be nullstream_configobjectrequiredread-onlycreated_bystring (uuid)requiredread-onlycan be nullcreated_by_usernamestringrequiredread-onlycreated_atstring (date-time)requiredread-onlyupdated_atstring (date-time)requiredread-onlyprovider_linkobjectrequiredread-onlycan be nullproviderintegerrequiredprovider_namestringrequireditem_namestringrequiredThe channel's name at the provider.
gonebooleanrequiredThe provider no longer lists it.
spare_namestringrequiredThe provider tried last when its sources fail; may be empty.
archive_daysintegerRecord this channel so viewers can watch what aired in the last this many days (TV archive). 0 = off.
What it costs: the channel runs all the time on the server that records it, so it holds one provider connection permanently, and it uses disk at its own bitrate (about 10.8 GB a day per Mb/s). Recordings are the channel as viewers get it, never re-encoded. Turning it off deletes the recordings.
archive_serverstring (uuid)can be nullThe server that records this channel and plays its catch-up. The channel runs there, so viewers of the live channel are sent there too: one provider connection, not two. If it goes down, the channel moves to another server and recording waits for it.
catchupobjectrequiredread-onlycan be nullrecordingbooleanrequiredpausedbooleanrequiredThe server paused recording (its disk is full).
bytesintegerrequiredfromstring (date-time)requiredcan be nulltostring (date-time)requiredcan be nullrecorded_secondsintegerrequiredgapsintegerrequiredbytes_per_dayintegerrequiredcan be nullKnown after ten minutes of recording.
disk_free_bytesintegerrequiredcan be nulldisk_total_bytesintegerrequiredcan be null
created_channelobjectrequiredread-onlycan be nullupdated_atstring (date-time)requiredends_atstring (date-time)requiredcan be null
delayedobjectrequiredread-onlycan be nullsecondsintegerrequiredoriginalobjectrequiredcan be nullNull when it records its own source.
idstring (uuid)requirednamestringrequired
own_sourcebooleanrequiredsource_statusstringrequiredThe status of the channel it records.
serverobjectrequiredcan be nullidstring (uuid)requirednamestringrequired
recordingbooleanrequiredrecorded_fromstring (date-time)requiredcan be nullready_atstring (date-time)requiredcan be nullWhen the whole delay is recorded.
feeds_delaysbooleanrequiredread-only
Errors
- 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
- 401 No credential, or one that is wrong, expired or revoked.
- 403 The account, or the key's or app's scopes, may not do this.
- 429 Slow down: wait the seconds in the Retry-After header, then try again.