# cafe.thunderbird.video.track

> A piece of video with its media on the author's PDS: a concert, a lecture, any event or clip. The basic fields follow cafe.thunderbird.audio.track (`artist` is whoever is performing or speaking, not the uploader), with the same optional `recording` section; `durationMs`, `tags` (group:value) and `contentRights` follow Streamplace's place.stream.video, so the two are easy to index together. `format` says how the media is stored; today "muxl": DASL's MUXL pieces, one per keyframe group and track, each its own blob, so a player can fetch only the seconds it plays and check each piece against its address.

- Kind: record
- Record key: tid
- Authority: video.thunderbird.cafe
- Lexicon: 1
- Published by [thunderbird.cafe](https://lexicon.garden/identity/did:plc:6vxjigxrqizmbo56gojxico3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.video.track)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.video.track/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.video.track/analytics)

## Record (`cafe.thunderbird.video.track`)

Type: record · key tid

### Properties

- `album` (string): The show, tour, series or event it belongs to.
  - Constraints: maxLength: 256
- `artist` (string): Who is performing or speaking (a band, a speaker, a group), not the account that uploaded it.
  - Constraints: minLength: 1, maxLength: 256
- `contentRights` (ref)
  - Reference: `#contentRights`
- `createdAt` (string · datetime, required): When the video was added.
- `credits` (array): Names to credit, for example the songwriter of a cover, or the act a band opened for. Names only.
  - Constraints: maxLength: 12
  - `items` (ref)
    - Reference: `#credit`
- `description` (string): Notes about the video.
  - Constraints: maxLength: 5000
- `durationMs` (integer): Length in milliseconds (as place.stream.video).
  - Constraints: minimum: 1
- `format` (string, required): How the media is stored: "muxl" (the `muxl` section). Players skip formats they don't know.
  - Constraints: maxLength: 32, knownValues: muxl
- `height` (integer): The video's height in pixels.
  - Constraints: minimum: 1, maximum: 8192
- `imageBlob` (blob): The card picture (a frame chosen to stand for the video).
  - Constraints: maxSize: 10000000, accept: image/png, image/jpeg, image/webp, image/gif
- `links` (array): Web pages about the video's subjects, for example the band's and the venue's sites. A player shows them as plain labelled links.
  - Constraints: maxLength: 4
  - `items` (ref)
    - Reference: `#link`
- `muxl` (ref)
  - Reference: `#muxl`
- `poster` (blob): A picture shown before the video plays: its first frame, so nothing jumps when it starts.
  - Constraints: maxSize: 1000000, accept: image/jpeg, image/png, image/webp
- `recording` (ref)
  - Reference: `#recording`
- `tags` (array): The creator's tags. Plain words, or group:value as Streamplace does (for example lang:en, event:concert).
  - Constraints: maxLength: 20
  - `items` (string)
    - Constraints: maxLength: 50
- `title` (string, required): The video's title (for a live song, the song; for a talk, its title).
  - Constraints: minLength: 1, maxLength: 256
- `width` (integer): The video's width in pixels.
  - Constraints: minimum: 1, maximum: 8192

## #contentRights (`cafe.thunderbird.video.track#contentRights`)

Type: object

Copyright and licensing, with the field names and license values of Streamplace's place.stream.metadata.contentRights (copied, not referenced, so this lexicon stands alone).

### Properties

- `copyrightNotice` (string): Copyright notice for the work.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `copyrightYear` (integer): Year of creation or publication.
  - Constraints: minimum: 1800, maximum: 3000
- `creator` (string): Name of the creator of the work.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `creditLine` (string): Credit line for the work.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `license` (string): License URL or identifier.
  - Constraints: maxLength: 2000, knownValues: place.stream.metadata.contentRights#all-rights-reserved | place.stream.metadata.contentRights#cc0_1__0 | place.stream.metadata.contentRights#cc-by_4__0 | place.stream.metadata.contentRights#cc-by-sa_4__0 | place.stream.metadata.contentRights#cc-by-nc_4__0 | place.stream.metadata.contentRights#cc-by-nc-sa_4__0 | place.stream.metadata.contentRights#cc-by-nd_4__0 | place.stream.metadata.contentRights#cc-by-nc-nd_4__0

## #credit (`cafe.thunderbird.video.track#credit`)

Type: object

### Properties

- `name` (string, required)
  - Constraints: minLength: 1, maxLength: 256
- `role` (string, required): For example "Written by" or "Opening for".
  - Constraints: minLength: 1, maxLength: 64

## #flat (`cafe.thunderbird.video.track#flat`)

Type: object

MUXL's flat MP4, which the header and the segments join into (not stored as a file of its own).

### Properties

- `cid` (string · cid, required): Its address (raw codec, sha-256), as a blob of those bytes would have.
- `size` (integer, required)
  - Constraints: minimum: 1

## #link (`cafe.thunderbird.video.track#link`)

Type: object

### Properties

- `label` (string, required): What the page is, for example the band's name.
  - Constraints: minLength: 1, maxLength: 64
- `url` (string · uri, required): An https address.
  - Constraints: maxLength: 2000

## #muxl (`cafe.thunderbird.video.track#muxl`)

Type: object

MUXL media (https://dasl.ing): each track as an init segment plus one canonical segment per keyframe group. The header followed by the segments in keyframe-group order (for each group, every track by track id) is exactly MUXL's flat MP4, whose address is `flat`.

### Properties

- `flat` (ref, required)
  - Reference: `#flat`
- `header` (blob, required): The flat MP4's header (header.mp4).
  - Constraints: maxSize: 10000000, accept: */*
- `index` (blob, required): index.json: each piece's start, duration, size and address, in the order the players use.
  - Constraints: maxSize: 2000000, accept: application/json, application/octet-stream, text/plain
- `tracks` (array, required)
  - Constraints: minLength: 1, maxLength: 8
  - `items` (ref)
    - Reference: `#muxlTrack`

## #muxlTrack (`cafe.thunderbird.video.track#muxlTrack`)

Type: object

### Properties

- `codec` (string, required): The codec string, for example avc1.64001f or mp4a.40.2.
  - Constraints: maxLength: 64
- `init` (blob, required): The track's init segment (init.mp4).
  - Constraints: maxSize: 1000000, accept: */*
- `kind` (string, required)
  - Constraints: maxLength: 16, knownValues: video | audio
- `segments` (array, required): The track's canonical segments, one per keyframe group, in order.
  - Constraints: minLength: 1, maxLength: 10000
  - `items` (blob)
    - Constraints: maxSize: 5000000, accept: */*

## #recording (`cafe.thunderbird.video.track#recording`)

Type: object

Where and how a recording was made (as cafe.thunderbird.audio.track's).

### Properties

- `archiveUrl` (string · uri): The show's page.
  - Constraints: maxLength: 2000
- `date` (string): The performance date: YYYY-MM-DD, YYYY-MM or YYYY.
  - Constraints: maxLength: 10
- `place` (string): City and state or country.
  - Constraints: maxLength: 256
- `policyUrl` (string · uri): The performer's sharing policy.
  - Constraints: maxLength: 2000
- `set` (string): A set, session or part (for example Set 1, Encore, Q&A).
  - Constraints: maxLength: 64
- `source` (string): How it was recorded (for example a phone in the audience), and the lineage.
  - Constraints: maxLength: 1000
- `taper` (string): Who recorded it.
  - Constraints: maxLength: 256
- `venue` (string)
  - Constraints: maxLength: 256

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "contentRights": {
      "description": "Copyright and licensing, with the field names and license values of Streamplace's place.stream.metadata.contentRights (copied, not referenced, so this lexicon stands alone).",
      "properties": {
        "copyrightNotice": {
          "description": "Copyright notice for the work.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "copyrightYear": {
          "description": "Year of creation or publication.",
          "maximum": 3000,
          "minimum": 1800,
          "type": "integer"
        },
        "creator": {
          "description": "Name of the creator of the work.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "creditLine": {
          "description": "Credit line for the work.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "license": {
          "description": "License URL or identifier.",
          "knownValues": [
            "place.stream.metadata.contentRights#all-rights-reserved",
            "place.stream.metadata.contentRights#cc0_1__0",
            "place.stream.metadata.contentRights#cc-by_4__0",
            "place.stream.metadata.contentRights#cc-by-sa_4__0",
            "place.stream.metadata.contentRights#cc-by-nc_4__0",
            "place.stream.metadata.contentRights#cc-by-nc-sa_4__0",
            "place.stream.metadata.contentRights#cc-by-nd_4__0",
            "place.stream.metadata.contentRights#cc-by-nc-nd_4__0"
          ],
          "maxLength": 2000,
          "type": "string"
        }
      },
      "type": "object"
    },
    "credit": {
      "properties": {
        "name": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "role": {
          "description": "For example \"Written by\" or \"Opening for\".",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "role",
        "name"
      ],
      "type": "object"
    },
    "flat": {
      "description": "MUXL's flat MP4, which the header and the segments join into (not stored as a file of its own).",
      "properties": {
        "cid": {
          "description": "Its address (raw codec, sha-256), as a blob of those bytes would have.",
          "format": "cid",
          "type": "string"
        },
        "size": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "cid",
        "size"
      ],
      "type": "object"
    },
    "link": {
      "properties": {
        "label": {
          "description": "What the page is, for example the band's name.",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "url": {
          "description": "An https address.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        }
      },
      "required": [
        "label",
        "url"
      ],
      "type": "object"
    },
    "main": {
      "description": "A piece of video with its media on the author's PDS: a concert, a lecture, any event or clip. The basic fields follow cafe.thunderbird.audio.track (`artist` is whoever is performing or speaking, not the uploader), with the same optional `recording` section; `durationMs`, `tags` (group:value) and `contentRights` follow Streamplace's place.stream.video, so the two are easy to index together. `format` says how the media is stored; today \"muxl\": DASL's MUXL pieces, one per keyframe group and track, each its own blob, so a player can fetch only the seconds it plays and check each piece against its address.",
      "key": "tid",
      "record": {
        "properties": {
          "album": {
            "description": "The show, tour, series or event it belongs to.",
            "maxLength": 256,
            "type": "string"
          },
          "artist": {
            "description": "Who is performing or speaking (a band, a speaker, a group), not the account that uploaded it.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "contentRights": {
            "ref": "#contentRights",
            "type": "ref"
          },
          "createdAt": {
            "description": "When the video was added.",
            "format": "datetime",
            "type": "string"
          },
          "credits": {
            "description": "Names to credit, for example the songwriter of a cover, or the act a band opened for. Names only.",
            "items": {
              "ref": "#credit",
              "type": "ref"
            },
            "maxLength": 12,
            "type": "array"
          },
          "description": {
            "description": "Notes about the video.",
            "maxLength": 5000,
            "type": "string"
          },
          "durationMs": {
            "description": "Length in milliseconds (as place.stream.video).",
            "minimum": 1,
            "type": "integer"
          },
          "format": {
            "description": "How the media is stored: \"muxl\" (the `muxl` section). Players skip formats they don't know.",
            "knownValues": [
              "muxl"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "height": {
            "description": "The video's height in pixels.",
            "maximum": 8192,
            "minimum": 1,
            "type": "integer"
          },
          "imageBlob": {
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/gif"
            ],
            "description": "The card picture (a frame chosen to stand for the video).",
            "maxSize": 10000000,
            "type": "blob"
          },
          "links": {
            "description": "Web pages about the video's subjects, for example the band's and the venue's sites. A player shows them as plain labelled links.",
            "items": {
              "ref": "#link",
              "type": "ref"
            },
            "maxLength": 4,
            "type": "array"
          },
          "muxl": {
            "ref": "#muxl",
            "type": "ref"
          },
          "poster": {
            "accept": [
              "image/jpeg",
              "image/png",
              "image/webp"
            ],
            "description": "A picture shown before the video plays: its first frame, so nothing jumps when it starts.",
            "maxSize": 1000000,
            "type": "blob"
          },
          "recording": {
            "ref": "#recording",
            "type": "ref"
          },
          "tags": {
            "description": "The creator's tags. Plain words, or group:value as Streamplace does (for example lang:en, event:concert).",
            "items": {
              "maxLength": 50,
              "type": "string"
            },
            "maxLength": 20,
            "type": "array"
          },
          "title": {
            "description": "The video's title (for a live song, the song; for a talk, its title).",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "width": {
            "description": "The video's width in pixels.",
            "maximum": 8192,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "title",
          "format",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "muxl": {
      "description": "MUXL media (https://dasl.ing): each track as an init segment plus one canonical segment per keyframe group. The header followed by the segments in keyframe-group order (for each group, every track by track id) is exactly MUXL's flat MP4, whose address is `flat`.",
      "properties": {
        "flat": {
          "ref": "#flat",
          "type": "ref"
        },
        "header": {
          "accept": [
            "*/*"
          ],
          "description": "The flat MP4's header (header.mp4).",
          "maxSize": 10000000,
          "type": "blob"
        },
        "index": {
          "accept": [
            "application/json",
            "application/octet-stream",
            "text/plain"
          ],
          "description": "index.json: each piece's start, duration, size and address, in the order the players use.",
          "maxSize": 2000000,
          "type": "blob"
        },
        "tracks": {
          "items": {
            "ref": "#muxlTrack",
            "type": "ref"
          },
          "maxLength": 8,
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "index",
        "header",
        "flat",
        "tracks"
      ],
      "type": "object"
    },
    "muxlTrack": {
      "properties": {
        "codec": {
          "description": "The codec string, for example avc1.64001f or mp4a.40.2.",
          "maxLength": 64,
          "type": "string"
        },
        "init": {
          "accept": [
            "*/*"
          ],
          "description": "The track's init segment (init.mp4).",
          "maxSize": 1000000,
          "type": "blob"
        },
        "kind": {
          "knownValues": [
            "video",
            "audio"
          ],
          "maxLength": 16,
          "type": "string"
        },
        "segments": {
          "description": "The track's canonical segments, one per keyframe group, in order.",
          "items": {
            "accept": [
              "*/*"
            ],
            "maxSize": 5000000,
            "type": "blob"
          },
          "maxLength": 10000,
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "kind",
        "codec",
        "init",
        "segments"
      ],
      "type": "object"
    },
    "recording": {
      "description": "Where and how a recording was made (as cafe.thunderbird.audio.track's).",
      "properties": {
        "archiveUrl": {
          "description": "The show's page.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        },
        "date": {
          "description": "The performance date: YYYY-MM-DD, YYYY-MM or YYYY.",
          "maxLength": 10,
          "type": "string"
        },
        "place": {
          "description": "City and state or country.",
          "maxLength": 256,
          "type": "string"
        },
        "policyUrl": {
          "description": "The performer's sharing policy.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        },
        "set": {
          "description": "A set, session or part (for example Set 1, Encore, Q&A).",
          "maxLength": 64,
          "type": "string"
        },
        "source": {
          "description": "How it was recorded (for example a phone in the audience), and the lineage.",
          "maxLength": 1000,
          "type": "string"
        },
        "taper": {
          "description": "Who recorded it.",
          "maxLength": 256,
          "type": "string"
        },
        "venue": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "A piece of video (a live song, a talk, an event, a clip) with its media files on the author's PDS. The sibling of cafe.thunderbird.audio.track.",
  "id": "cafe.thunderbird.video.track",
  "lexicon": 1
}
```
