Skip to content

place.stream.media.finalizeLivestream

Lexicon Version: 1

Type: procedure

Turn a finished livestream into a VOD. The server concatenates the MUXL segments it recorded for the livestream(s) into a single content blob, derives the playback sidecars, and publishes the place.stream.media.track records. By default it leaves a draft VOD the streamer publishes later via place.stream.vod.publishDraft; with publish set it publishes the place.stream.video record as soon as the VOD is finalized. The caller must be the streamer, or a moderator they have granted livestream.manage; every record is written with the streamer’s session.

Parameters: (None defined)

Input:

  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
livestreamstring❌AT-URI of the place.stream.livestream record to finalize into a VOD. Either this or livestreams is required.Format: at-uri
livestreamsArray of string❌Several livestream records whose recordings make up one VOD: a streamer who started a new record mid-stream splits the recording across them. Recordings are concatenated in the records’ creation order, whatever order they are listed in. All must belong to one streamer.
titlestring❌Title of the video record; the first livestream’s title when empty.Max Length: 1000
descriptionstring❌Description of the video record.Max Length: 10000
publishboolean❌Publish the place.stream.video record as soon as the VOD is finalized, instead of leaving a draft.Default: false
endLivestreamboolean❌Also end any of the livestream records that were never stopped, so the streamer’s page stops reading as live.Default: false

Output:

  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
uploadIdstring✅Identifier for the finalize job. Retained for backwards compatibility; the draft flow no longer requires the client to poll getUploadStatus.
draftUristring❌The ats:// URI of the draft VOD created for this finalize, when publish is not set. The draft reaches status ‘ready’ when processing completes.
livestreamsArray of string❌The livestream records the VOD is made of, in recording order.
objectsinteger❌How many recorded objects will be concatenated.
endedArray of string❌Livestream records that are now ended (already, or by endLivestream).

Possible Errors:

  • LivestreamNotFound: No livestream with the given URI is known to this node, or the livestreams belong to different streamers.
  • NoRecording: The livestream has no recorded MUXL segments to finalize (recording was not enabled, or none completed).
  • NotPermitted: The caller is neither the streamer nor a moderator with livestream.manage from them.

{
"lexicon": 1,
"id": "place.stream.media.finalizeLivestream",
"defs": {
"main": {
"type": "procedure",
"description": "Turn a finished livestream into a VOD. The server concatenates the MUXL segments it recorded for the livestream(s) into a single content blob, derives the playback sidecars, and publishes the place.stream.media.track records. By default it leaves a draft VOD the streamer publishes later via place.stream.vod.publishDraft; with publish set it publishes the place.stream.video record as soon as the VOD is finalized. The caller must be the streamer, or a moderator they have granted livestream.manage; every record is written with the streamer's session.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [],
"properties": {
"livestream": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the place.stream.livestream record to finalize into a VOD. Either this or livestreams is required."
},
"livestreams": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
},
"description": "Several livestream records whose recordings make up one VOD: a streamer who started a new record mid-stream splits the recording across them. Recordings are concatenated in the records' creation order, whatever order they are listed in. All must belong to one streamer."
},
"title": {
"type": "string",
"maxLength": 1000,
"description": "Title of the video record; the first livestream's title when empty."
},
"description": {
"type": "string",
"maxLength": 10000,
"description": "Description of the video record."
},
"publish": {
"type": "boolean",
"default": false,
"description": "Publish the place.stream.video record as soon as the VOD is finalized, instead of leaving a draft."
},
"endLivestream": {
"type": "boolean",
"default": false,
"description": "Also end any of the livestream records that were never stopped, so the streamer's page stops reading as live."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["uploadId"],
"properties": {
"uploadId": {
"type": "string",
"description": "Identifier for the finalize job. Retained for backwards compatibility; the draft flow no longer requires the client to poll getUploadStatus."
},
"draftUri": {
"type": "string",
"description": "The ats:// URI of the draft VOD created for this finalize, when publish is not set. The draft reaches status 'ready' when processing completes."
},
"livestreams": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
},
"description": "The livestream records the VOD is made of, in recording order."
},
"objects": {
"type": "integer",
"description": "How many recorded objects will be concatenated."
},
"ended": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
},
"description": "Livestream records that are now ended (already, or by endLivestream)."
}
}
}
},
"errors": [
{
"name": "LivestreamNotFound",
"description": "No livestream with the given URI is known to this node, or the livestreams belong to different streamers."
},
{
"name": "NoRecording",
"description": "The livestream has no recorded MUXL segments to finalize (recording was not enabled, or none completed)."
},
{
"name": "NotPermitted",
"description": "The caller is neither the streamer nor a moderator with livestream.manage from them."
}
]
}
}
}