{
  "id": "osc-stack-media-asset-indexing",
  "job": "Index every media segment already stored in S3-compatible storage, so a query returns the exact segment by timecode instead of a person scrubbing through footage.",
  "aliases": [
    "media asset indexing",
    "video segment lookup",
    "MAM-adjacent segment index",
    "find a clip by timecode"
  ],
  "inputs": [
    {
      "protocol": "file",
      "source": "media segments already produced and stored in S3-compatible storage (e.g. output of a transcode/package chain such as the media-transcode-package stack, or any pre-segmented media)"
    }
  ],
  "outputs": [
    {
      "protocol": "HTTP query",
      "returns": "the segment record (location, time range, metadata) for a matching query against the index",
      "indexScope": "per-segment, not per-asset: this indexes segmented media flows, not whole files as single opaque units"
    }
  ],
  "recommendedPath": {
    "chain": [
      {
        "step": 1,
        "serviceId": "apache-couchdb",
        "role": "index store",
        "requiredConfig": ["name", "AdminPassword"],
        "requiresCredential": true,
        "note": "AdminPassword is required and sensitive on this service's own schema; it becomes eyevinn-tams-gateway's DbPassword in step 3. holds the TAMS segment index and metadata that eyevinn-tams-gateway reads and writes."
      },
      {
        "step": 2,
        "serviceId": "minio-minio",
        "role": "segment storage",
        "requiredConfig": ["name", "RootUser", "RootPassword"],
        "requiresCredential": true,
        "note": "RootUser/RootPassword are optional on minio-minio's own schema but must be set here because eyevinn-tams-gateway needs a fixed access key pair to authenticate against this instance in step 3 (its AwsAccessKeyId/AwsSecretAccessKey). A bucket must also be created on this instance (via its own console or API, not an OSC platform tool) before naming it in S3Bucket below. RootPassword must be at least 10 characters with upper case, lower case and a digit. minio-minio's schema has no bucket-creation field of its own. S3-compatible storage for the media segments themselves; TAMS Gateway indexes segments here, it does not store them itself."
      },
      {
        "step": 3,
        "serviceId": "eyevinn-tams-gateway",
        "role": "index and query",
        "requiredConfig": [
          "name",
          "DbUrl",
          "DbUsername",
          "DbPassword",
          "AwsAccessKeyId",
          "AwsSecretAccessKey",
          "S3Bucket"
        ],
        "recommendedConfig": ["S3EndpointUrl"],
        "requiresCredential": true,
        "fieldMapping": {
          "DbUrl": "the CouchDB instance URL from step 1",
          "DbUsername": "admin (the fixed CouchDB admin username on OSC; not a step 1 field)",
          "DbPassword": "AdminPassword from step 1",
          "AwsAccessKeyId": "RootUser from step 2",
          "AwsSecretAccessKey": "RootPassword from step 2",
          "S3Bucket": "the bucket name created on the step-2 Minio instance",
          "S3EndpointUrl": "the step-2 Minio instance's own endpoint URL, not left blank - S3EndpointUrl is optional on eyevinn-tams-gateway's schema and defaults to AWS S3 when absent, which silently points this stack at the wrong storage"
        },
        "note": "Without S3EndpointUrl set to the Minio instance from step 2, this service talks to AWS S3 instead of the deployed Minio, even though the credentials came from Minio."
      }
    ],
    "alternativePath": null,
    "optionalIndexStep": null,
    "tokensPerDay": null,
    "tokensPerDayMeasured": false,
    "measuredWallClockSeconds": null,
    "wallClockMeasured": false,
    "gapNote": "No author has run this chain end to end and timed or costed it yet. No number is invented here; this is a named gap, not a filled-in figure, the same discipline the media-transcode-package stack (public/stacks/media-transcode-package.json) already applies to its own unmeasured wall-clock and cost fields.",
    "agentFoundServiceUnaided": null
  },
  "configSurface": {
    "servicesInChain": 3,
    "totalRequiredFieldsAcrossChain": 10,
    "sensitiveFields": [
      "AdminPassword",
      "RootPassword",
      "DbPassword",
      "AwsSecretAccessKey"
    ],
    "note": "Three services must be wired together (CouchDB for the index, Minio for the segments, TAMS Gateway bridging both), so the chain is one step longer than the two-service media-transcode-package stack."
  },
  "setup": {
    "codeRequired": false,
    "knownDeployGotcha": "eyevinn-tams-gateway requires both a CouchDB instance (DbUrl/DbUsername/DbPassword) and an S3-compatible storage instance (AwsAccessKeyId/AwsSecretAccessKey/S3Bucket) already deployed before it can be configured; deploy those first."
  },
  "cost": {
    "unit": "tokens/day",
    "ceiling": null,
    "ceilingMeasured": false,
    "note": "Not costed as a named stack yet. Named gap, not an invented figure, per the same P5 CEO decision the media-transcode-package stack already follows."
  },
  "notMAM": {
    "statement": "No MAM (media asset management) product exists in the OSC catalog as such, re-verified live 2026-09-21 (186 services total, 63 in the media category, none named MAM). This stack is the honest MAM-adjacent building block available today: segment storage and indexing, not a MAM product.",
    "verifiedAgainst": "public/stacks/media-transcode-package.json, which already names eyevinn-tams-gateway as an optional indexing step with the identical disclaimer; this stack makes the indexing job the lead instead of an optional add-on, which is the distinct buyer outcome this page addresses."
  },
  "servicesVerifiedLive": {
    "date": "2026-09-21",
    "method": "osc_call_tool wrap (mcp__osc__osc_call_tool with name=get-service-schema / name=list-available-services) on eyevinn-tams-gateway, apache-couchdb, minio-minio; direct mcp__osc__get-service-schema and mcp__osc__list-service-categories calls ERROR under operator mode, per the same operator-mode correction CLAUDE.md records for the catalog service count and the media-transcode-package stack applied 2026-09-20",
    "catalogTotal": 186,
    "mediaCategory": 63
  },
  "gateCheck": {
    "gatedServiceId": "eyevinn-just-go-live",
    "usesGatedService": false,
    "note": "This stack does not name or link eyevinn-just-go-live; the P3 gate does not bind it."
  },
  "duplicationCheck": {
    "date": "2026-09-21",
    "method": "compared this page and recipe against the 36 live /use-cases pages (curl https://www.osaas.io/use-cases) before writing; the closest existing pages are vod-transcoding and mediasupply, both of which cover transcode-and-package, not segment indexing/lookup. eyevinn-tams-gateway already appears inside public/stacks/media-transcode-package.json as an optional add-on step; this page makes indexing the primary outcome rather than duplicating that recipe.",
    "result": "no duplicate found; new buyer outcome (find a segment) distinct from the existing transcode/package outcome"
  },
  "verifiedOn": "2026-09-21",
  "publishedAt": "https://www.osaas.io/use-cases/media-asset-indexing",
  "descriptorUrl": "https://www.osaas.io/stacks/media-asset-indexing.json"
}
