Skip to content

place.stream.segment

Lexicon Version: 1

Type: record

Media file representing a segment of a livestream

Record Key: tid

Record Properties:

NameTypeReq’dDescriptionConstraints
idstringUnique identifier for the segment
signingKeystringThe DID of the signing key used for this segment
startTimestringWhen this segment startedFormat: datetime
durationintegerThe duration of the segment in nanoseconds
creatorstringFormat: did
videoArray of #video
audioArray of #audio

Type: object

Properties:

NameTypeReq’dDescriptionConstraints
codecstringEnum: opus
rateinteger
channelsinteger

Type: object

Properties:

NameTypeReq’dDescriptionConstraints
codecstringEnum: h264
widthinteger
heightinteger
framerate#framerate

Type: object

Properties:

NameTypeReq’dDescriptionConstraints
numinteger
deninteger

Type: object

Properties:

NameTypeReq’dDescriptionConstraints
cidstringFormat: cid
recordunknown

{
"lexicon": 1,
"id": "place.stream.segment",
"defs": {
"main": {
"type": "record",
"description": "Media file representing a segment of a livestream",
"key": "tid",
"record": {
"type": "object",
"required": ["id", "signingKey", "startTime", "creator"],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the segment"
},
"signingKey": {
"type": "string",
"description": "The DID of the signing key used for this segment"
},
"startTime": {
"type": "string",
"format": "datetime",
"description": "When this segment started"
},
"duration": {
"type": "integer",
"description": "The duration of the segment in nanoseconds"
},
"creator": {
"type": "string",
"format": "did"
},
"video": {
"type": "array",
"items": {
"type": "ref",
"ref": "#video"
}
},
"audio": {
"type": "array",
"items": {
"type": "ref",
"ref": "#audio"
}
}
}
}
},
"audio": {
"type": "object",
"required": ["codec", "rate", "channels"],
"properties": {
"codec": {
"type": "string",
"enum": ["opus"]
},
"rate": {
"type": "integer"
},
"channels": {
"type": "integer"
}
}
},
"video": {
"type": "object",
"required": ["codec", "width", "height"],
"properties": {
"codec": {
"type": "string",
"enum": ["h264"]
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"framerate": {
"type": "ref",
"ref": "#framerate"
}
}
},
"framerate": {
"type": "object",
"required": ["num", "den"],
"properties": {
"num": {
"type": "integer"
},
"den": {
"type": "integer"
}
}
},
"segmentView": {
"type": "object",
"required": ["cid", "record"],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"record": {
"type": "unknown"
}
}
}
}
}