{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A video registered for inclusion in a consent-first dataset. Storage of the bytes is decoupled: this record only commits to a content hash and a pointer. Its consent, if any, is the org.consentvid.consent record in the same repo with the same record key.",
      "key": "tid",
      "record": {
        "properties": {
          "contentHash": {
            "description": "SHA-256 of the video bytes: \"sha256-\" followed by 64 lowercase hex characters.",
            "maxLength": 80,
            "type": "string"
          },
          "createdAt": {
            "description": "Record write time.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxLength": 3000,
            "type": "string"
          },
          "durationMs": {
            "description": "Duration in milliseconds: non-negative, at most 2^53-1. ATproto records have no float type.",
            "type": "integer"
          },
          "height": {
            "description": "Frame height in pixels: non-negative, at most 2^53-1.",
            "type": "integer"
          },
          "language": {
            "description": "BCP-47 language tag for the primary spoken language, if any, with a lowercase primary subtag (e.g. en, cs, pt-BR); readers reject other values.",
            "type": "string"
          },
          "mimeType": {
            "description": "MIME type of the video bytes, e.g. video/mp4. Readers reject values outside knownValues: it becomes the dataset's encodingFormat, which dataset loaders act on.",
            "knownValues": [
              "video/3gpp",
              "video/matroska",
              "video/mp2t",
              "video/mp4",
              "video/mpeg",
              "video/quicktime",
              "video/vnd.avi",
              "video/webm",
              "video/x-matroska",
              "video/x-msvideo"
            ],
            "maxLength": 128,
            "type": "string"
          },
          "storageRef": {
            "ref": "#storageRef",
            "type": "ref"
          },
          "tags": {
            "description": "Topic tags, at most 32, each at most 64 UTF-8 bytes.",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxLength": 32,
            "type": "array"
          },
          "title": {
            "description": "Human-readable title, at most 300 UTF-8 bytes.",
            "maxLength": 300,
            "type": "string"
          },
          "width": {
            "description": "Frame width in pixels: non-negative, at most 2^53-1.",
            "type": "integer"
          }
        },
        "required": [
          "title",
          "contentHash",
          "storageRef",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "storageRef": {
      "description": "Where the video bytes live. Readers reject refs whose value does not match the kind.",
      "properties": {
        "kind": {
          "description": "'url' = a public https URL; 'r2' = the public https URL of a Cloudflare R2 object; 'peertube' = an https watch/download URL on a PeerTube instance (for these three: a public host on the default port, no credentials); 'ipfs' = a CID (bafy... or Qm...), optionally ipfs://-prefixed; 'local' = an opaque contributor-side name, never dereferenced (no control characters).",
          "knownValues": [
            "url",
            "local",
            "ipfs",
            "r2",
            "peertube"
          ],
          "type": "string"
        },
        "value": {
          "description": "Where the bytes live: a URL (url/r2/peertube), a CID (ipfs), or for 'local' an opaque contributor-side name. Never an absolute filesystem path (records are public).",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "value"
      ],
      "type": "object"
    }
  },
  "id": "org.consentvid.video",
  "lexicon": 1
}
