{
  "$schema": "https://openworkflowgraph.org/schemas/core/v0.92.json",
  "owg_version": "0.92",
  "id": "opentrackio-camera-take",
  "project_id": "opentrackio-camera-take",
  "profiles": ["core", "physical-production"],
  "description": "OpenTrackIO binding — one virtual-production take. The camera and its tracker are infrastructure; the recorded stream of tracking samples is an asset that carries the source id the tracker emitted; a QC task checks the log before a render task uses it against a USD scene. The live UDP stream stays outside the graph. OWG records what was captured, on what, and what consumed it. The take's timecode range sits in an x- metadata key, because the schema's timerange field is documented for TAMS syntax only.",
  "objective": "Record the tracking data for a take as a governed asset, check it, and use it to render a background that matches the camera move, with the lineage intact.",
  "organizations": [
    { "id": "org_stage", "name": "Example Virtual Production Stage", "role": "service-provider" },
    { "id": "org_production", "name": "Example Production", "role": "studio" }
  ],
  "participants": [
    { "id": "dp", "kind": "human", "name": "Director of Photography", "role": "cinematographer", "organization_id": "org_production" },
    { "id": "vp_supervisor", "kind": "human", "name": "VP Supervisor", "role": "supervisor", "organization_id": "org_stage" },
    { "id": "svc_recorder", "kind": "service", "name": "Tracking Recorder", "organization_id": "org_stage" },
    { "id": "svc_qc", "kind": "service", "name": "Tracking QC", "organization_id": "org_stage" },
    { "id": "svc_render", "kind": "service", "name": "Real-time Render Engine", "organization_id": "org_stage" }
  ],
  "infrastructure": [
    { "id": "camera_rig", "type": "camera", "owner": "org_production", "product": "Cinema camera with OpenTrackIO output" },
    { "id": "stage_network", "type": "network", "owner": "org_stage", "spec": "multicast, PTP-synchronized" },
    { "id": "render_node", "type": "gpu_compute", "owner": "org_stage" }
  ],
  "contexts": [
    {
      "id": "scene_12_take_4",
      "name": "Scene 12, take 4",
      "work_type": "other",
      "metadata": { "type": "production_scene", "production": "Example Production" }
    }
  ],
  "assets": [
    {
      "id": "usd_stage_scene12",
      "role": "source",
      "type": "scene.usd",
      "content_type": "model/vnd.usd",
      "state": "accepted",
      "identifiers": [
        { "scope": "usd.assetInfo", "id": "asset://scene12/backlot/v7" }
      ],
      "storage": { "provider": "usd_resolver", "locator": "asset://scene12/backlot/v7", "zone": "us-west-2" }
    },
    {
      "id": "tracking_log_t4",
      "role": "intermediate",
      "type": "data.tracking",
      "content_type": "application/json",
      "produced_by": "record_tracking",
      "identifiers": [
        { "scope": "opentrackio.source", "id": "urn:uuid:3e8f1c52-9a47-4b0d-8c6e-2d7a5f1b9e04" }
      ],
      "storage": { "provider": "s3", "locator": "s3://stage/scene12/take4/tracking.jsonl", "zone": "us-west-2" },
      "metadata": {
        "x-opentrackio": {
          "protocol": "OpenTrackIO",
          "version": "1.0.1",
          "encoding": "json",
          "sample_rate": "24/1",
          "timecode_in": "14:32:10:00",
          "timecode_out": "14:33:02:12",
          "samples": 1260
        }
      }
    },
    {
      "id": "qc_report_t4",
      "role": "intermediate",
      "type": "document.note",
      "content_type": "application/json",
      "produced_by": "qc_tracking",
      "storage": { "provider": "s3", "locator": "s3://stage/scene12/take4/tracking-qc.json", "zone": "us-west-2" }
    },
    {
      "id": "background_render_t4",
      "role": "intermediate",
      "type": "video.render",
      "content_type": "video/quicktime",
      "produced_by": "render_background",
      "predecessor": "usd_stage_scene12",
      "version_relation": "derivation",
      "storage": { "provider": "s3", "locator": "s3://stage/scene12/take4/background.mov", "zone": "us-west-2" }
    }
  ],
  "tasks": [
    {
      "id": "record_tracking",
      "label": "Record OpenTrackIO stream for the take",
      "type": "task",
      "executor": { "type": "service", "ref": "opentrackio.record", "environment": "on_prem" },
      "performed_by": "svc_recorder",
      "ran_on": "stage_network",
      "produced": ["tracking_log_t4"],
      "failure_mode": "HALT"
    },
    {
      "id": "qc_tracking",
      "label": "Check timecode continuity, dropouts and lens data",
      "type": "qc",
      "executor": { "type": "service", "ref": "opentrackio.qc", "environment": "saas" },
      "performed_by": "svc_qc",
      "used": ["tracking_log_t4"],
      "produced": ["qc_report_t4"],
      "checks": ["timecode_continuity", "sequence_gaps", "lens_data_present", "ptp_locked"],
      "depends_on": ["record_tracking"],
      "failure_mode": "HALT"
    },
    {
      "id": "approve_take",
      "label": "VP supervisor approves the take data",
      "type": "review",
      "executor": { "type": "human", "ref": "review.approve", "environment": "desktop" },
      "performed_by": "vp_supervisor",
      "used": ["tracking_log_t4", "qc_report_t4"],
      "depends_on": ["qc_tracking"],
      "failure_mode": "HALT"
    },
    {
      "id": "render_background",
      "label": "Render background from the tracked camera move",
      "type": "task",
      "executor": { "type": "service", "ref": "render.realtime", "environment": "on_prem" },
      "performed_by": "svc_render",
      "ran_on": "render_node",
      "used": ["usd_stage_scene12", "tracking_log_t4"],
      "produced": ["background_render_t4"],
      "depends_on": ["approve_take"],
      "failure_mode": "HALT"
    }
  ]
}
