# place.stream.playback.getLiveSegment

> Fetch a single live HLS segment, or a track's init segment, from the in-memory live window. `seg` is `init` for the EXT-X-MAP init segment, otherwise the segment's media-sequence number; a cosmetic `.m4s` suffix is accepted (and ignored) so ffmpeg-based HLS players will fetch it. HTTP Range is honored. Segments are the verbatim signed canonical .m4s, so provenance travels with playback.

- Kind: query
- Authority: playback.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.playback.getLiveSegment)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.playback.getLiveSegment/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.playback.getLiveSegment/analytics)

## Query (`place.stream.playback.getLiveSegment`)

Type: query · GET

### Parameters (query string)

- `seg` (string, required): `init` for the track's init segment, or the segment's media-sequence number. A trailing `.m4s` is accepted and ignored.
- `sid` (string): Opaque playback session identifier, propagated from the media playlist that referenced this segment. Logged for view-count correlation; not used for access control.
- `streamer` (string, required): The streamer: a DID or a Bluesky handle (resolved to its DID).
- `track` (string, required): Track ID (stringified u32 matching the MUXL container).

### Output (video/mp4)


### Errors

- `StreamNotLive`: No live window for this streamer on this node.
- `SegmentNotFound`: The requested segment has slid out of the window, or never existed.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Fetch a single live HLS segment, or a track's init segment, from the in-memory live window. `seg` is `init` for the EXT-X-MAP init segment, otherwise the segment's media-sequence number; a cosmetic `.m4s` suffix is accepted (and ignored) so ffmpeg-based HLS players will fetch it. HTTP Range is honored. Segments are the verbatim signed canonical .m4s, so provenance travels with playback.",
      "errors": [
        {
          "description": "No live window for this streamer on this node.",
          "name": "StreamNotLive"
        },
        {
          "description": "The requested segment has slid out of the window, or never existed.",
          "name": "SegmentNotFound"
        }
      ],
      "output": {
        "encoding": "video/mp4"
      },
      "parameters": {
        "properties": {
          "seg": {
            "description": "`init` for the track's init segment, or the segment's media-sequence number. A trailing `.m4s` is accepted and ignored.",
            "type": "string"
          },
          "sid": {
            "description": "Opaque playback session identifier, propagated from the media playlist that referenced this segment. Logged for view-count correlation; not used for access control.",
            "type": "string"
          },
          "streamer": {
            "description": "The streamer: a DID or a Bluesky handle (resolved to its DID).",
            "type": "string"
          },
          "track": {
            "description": "Track ID (stringified u32 matching the MUXL container).",
            "type": "string"
          }
        },
        "required": [
          "streamer",
          "track",
          "seg"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "place.stream.playback.getLiveSegment",
  "lexicon": 1
}
```
