Stream Video Analysis

Stream Video Analysis is a fully managed, GPU-quickened real-time video analytics service on Oracle Cloud Infrastructure (OCI). It process live RTSP streams to deliver real-time insights using AI capabilities.

Key features are:

  • Object Detection: Detect objects, for example, people or vehicles, and returns bounding boxes.
  • Face Detection: Identifies faces with bounding box outputs.
  • Object Tracking: Using Object Tracking, you can track detected objects (currently limited to faces) across video frames. By assigning a unique identifier (tracking ID) to each face, the system maintains continuity of identity as a person moves through the camera view. In case of Face Tracking, both single camera tracking and multicamera tracking are supported.
    • Single Camera Tracking: Tracks faces within the bounds of a single camera stream. This means you can identify and track individuals as they move through the field of view of a specific camera.
    • Multicamera Tracking: Multicamera tracking means you can identify consistently across several camera streams. Cameras can be logically grouped so that a face detected in one stream can be recognized in another stream.

Performance and Scalability

Stream Video Analysis service is designed to provide low-latency, high-performance analytics powered by GPU acceleration. By default, the service supports a single stream job per user. If you need to scale beyond this limit, you can request extra resources through the OCI Support channel.

Camera Connectivity

Stream Video Analysis requires access to the video feed, either using the public internet or over a private, using fast connect.

Option 1: Public Connectivity using Static IP and Port Forwarding

  1. Request a static public IP address from your Internet Service Provider (ISP) for your home or office router.
    This IP serves as the external access point to your camera network.
  2. Connect the camera to your router through a LAN cable or WiFi
  3. Assign the camera a static private IP address.
  4. Enable port forwarding on the router.
    1. Open the router's administration panel.

    2. Configure a port forwarding rule:

      • External Port: 554 (standard for RTSP)

      • Forward to IP: This is the static private IP in step 3.

      • Internal Port: 554

  5. Access the RSTP stream.
    The RTSP stream is publicly accessible from:
    rtsp://<Static_Public_IP>:554/stream
  6. Create a VCN with a subnet having access to this static IP:
    1. Create a VCN:
      resource "oci_core_vcn" "vcn" {
        cidr_block     = "10.0.0.0/16"
        compartment_id = <compartment_id>
        display_name   = "vcn"
      }
    2. Create a private subnet:
      resource "oci_core_subnet" "private_subnet" {
        compartment_id              = <comparment_id>
        vcn_id                      = <vcn_id created in previous step>
        cidr_block                  = "10.0.0.0/24"
        display_name                = "private-subnet"
      }
    3. Add a route rule:
      resource "oci_core_route_table" "route" {
        compartment_id = <compartment_id>
        vcn_id         = <vcn_id>
       
        route_rules {
          destination       = "0.0.0.0/0"
          destination_type  = "CIDR_BLOCK"
          network_entity_id = oci_core_nat_gateway.natgw.id
          description       = "NAT Gateway for outbound internet traffic"
        }
      }
  7. You can now create a private endpoint using this subnet.

Option 2: Site-to-Site VPN

A more secure and scalable option is Setting Up Site-to-Site VPN between your on-premises router and OCI.

  1. Get a static public IP from your ISP for your router.
    This is required to establish the IPsec VPN tunnel.
  2. Create a CPE (Customer-Premises Equipment) object in OCI:
    1. In the Console, select Networking.
    2. Select Customer-Premises-Equipment.
    3. Select Create CPE.
    4. Enter your router's static public IP address.
  3. Establish the IPsec VPN tunnel.
    For more information, see Setting Up Site-to-Site VPN.
  4. Create a subnet in your OCI VCN to route traffic through this VPN connection.
  5. Update the subnet’s security list to allow inbound and outbound traffic to and from the on-premises camera network (that is, your CPE’s internal IP range).
  6. When the VPN is active and routing is configured, you can provide the subnet OCID in the CreateStreamSource request to securely ingest video feeds into OCI.

API Reference

Create Vision Private Endpoint
Create Vision Private Endpoint
Attribute Value
API Endpoint /latest/visionPrivateEndpoints
API Method POST
Sample Request Body
{
    "subnetId": "<<Valid Subnet OCID // only one pe per vcn is allowed>>",
    "compartmentId": "<<Valid Compartment OCID where pe should be made>>"
}
Sample Response Body 202 Accepted
{
    "subnetId": "<<Valid Subnet OCID>>",
    "compartmentId": "<<Valid Compartment OCID>>"
    "id": "<newly vision pe OCID>",
    "compartmentId": "<compartment OCID>",
    "timeCreated": "2025-07-17T08:20:19.875Z",
    "timeUpdated": "2025-07-17T08:20:19.875Z",
    "displayName": "<generated display name>",
    "lifecycleState": "CREATING",
    "freeformTags": {
        "oci-freeform": "xyz"
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    },
    "systemTags": {}
}

Create Stream Source

Creating stream source supports Public and Private access types. The difference between Public and Private endpoint lies in how the Vision Stream Analysis service accesses your video stream.

  • Private Endpoint: Streams are accessed securely through a Private Endpoint over OCI's internal network accessible within your OCI Virtual Cloud Network (VCN). This is the recommended method for production setups.
  • Public Endpoint: Exposes stream to the internet through a public IP.
Create Stream Source with Public Network Access Details
Attribute Value
API Endpoint /latest/streamSources
API Method POST
Sample Request Body
{
    "streamSourceDetails": {
        "sourceType": "RTSP",
        "cameraUrl": "<valid url>",
        "streamNetworkAccessDetails": {
            "streamAccessType": "PUBLIC"
        }
    },
    "compartmentId": "<valid compartment OCID>",
    "freeformTags": {
        "oci-freeform": ""
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    }
}
Sample Response Body 202 Accepted
{
    "streamSourceDetails": {
        "sourceType": "RTSP",
        "streamNetworkAccessDetails": {
            "streamAccessType": "PUBLIC"
        },
        "secretId": null,
        "cameraUrl": "<valid url>"
    },
    "id": "<newly created Stream Source OCID>",
    "compartmentId": "<valid compartment OCID>",
    "timeCreated": "2025-07-17T08:20:19.875Z",
    "timeUpdated": "2025-07-17T08:20:19.875Z",
    "displayName": "<generated display name>",
    "lifecycleState": "ACTIVE",
    "freeformTags": {
        "oci-freeform": "xyz"
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    },
    "systemTags": {}
}

Create Stream Source with Private Network Access Details
Attribute Value
API Endpoint /latest//streamSources
API Method POST
Sample Request Body

{
    "streamSourceDetails": {
        "sourceType": "RTSP",
        "cameraUrl": "<valid url>",
        "streamNetworkAccessDetails": {
            "streamAccessType": "PRIVATE",
            "privateEndpointId": "<Vision Private Endpoint OCID>"
        }
    },
    "compartmentId": "<valid compartment OCID>",
    "freeformTags": {
        "oci-freeform": ""
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    }
}
Sample Response Body 202 Accepted

{
    "streamSourceDetails": {
        "sourceType": "RTSP",
        "streamNetworkAccessDetails": {
            "streamAccessType": "PRIVATE",
            "visionPrivateEndpoint": "<Vision Private Endpoint OCID>"
        },
        "secretId": null,
        "cameraUrl": "<valid url>"
    },
    "id": "<newly created Stream Source OCID>",
    "compartmentId": "<valid compartment OCID>",
    "timeCreated": "2025-07-17T08:20:19.875Z",
    "timeUpdated": "2025-07-17T08:20:19.875Z",
    "displayName": "<generated display name>",
    "lifecycleState": "ACTIVE",
    "freeformTags": {
        "oci-freeform": "xyz"
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    },
    "systemTags": {}
}

Create Stream Job
Attribute Value
API Endpoint /latest/streamJobs
API Method POST
Sample Request Body
{
    "streamSourceId": "<<Valid Stream Source OCID>>",
    "streamOutputLocation": {
        "outputLocationType": "OBJECT_STORAGE",
        "namespaceName": "",
        "bucketName": "",
        "prefix": "",
        "oboToken": ""
    },
    "features": [
        {
            "featureType": "OBJECT_TRACKING",
            "trackingTypes": [
                {
                    "objects": [
                        "face"
                    ],
                    "shouldReturnLandmarks": true,
                    "maxResults": 50
                }
            ]
        }
    ],
    "compartmentId": "<<Valid Compartment OCID>>",
    "displayName": "Example Stream Job"
}
Sample Response Body 202 Accepted
{
    "id": "<<Generated Stream Job OCID>>",
    "streamSourceId": "<<Stream Source OCID>>",
    "compartmentId": "<<Compartment OCID>>",
    "displayName": "Example Stream Job",
    "features": [
        {
            "featureType": "OBJECT_TRACKING",
            "trackingTypes": [
                {
                    "objects": [
                        "face"
                    ],
                    "detectionModelId": null,
                    "trackingModelId": null,
                    "maxResults": 50,
                    "shouldReturnLandmarks": true,
                    "biometricStoreId": null,
                    "biometricStoreCompartmentId": null
                }
            ]
        }
    ],
    "streamOutputLocation": {
        "outputLocationType": "OBJECT_STORAGE",
        "namespaceName": "",
        "bucketName": "",
        "prefix": "",
        "oboToken": ""
    },
    "agentParticipantId": null,
    "lifecycleState": "INACTIVE",
    "lifecycleDetails": null,
    "timeCreated": "<<Timestamp>>",
    "timeUpdated": "<<Timestamp>>",
    "freeformTags": {},
    "definedTags": {},
 

Start Stream Job
Attribute Value
API Endpoint /latest/streamJobs/<<Stream Job Ocid>>/actions/start
API Method POST
Sample Response Body 202 Accepted

Stop Stream Job
Attribute Value
API Endpoint /latest/streamJobs/<Stream_Job_OCID>/actions/stop
API Method POST
Sample Response Body 202 Accepted

Get Stream Job
Attribute Value
API Endpoint /latest/streamJobs/<Stream_Job_OCID>
API Method GET
Sample Response Body 202 OK

Get Stream Source
Attribute Value
API Endpoint /latest/streamSources/<Stream_Job_OCID>
API Method GET
Sample Response Body 202 OK

Get Private Endpoint
Attribute Value
API Endpoint /latest/visionPrivateEndpoint/<Stream_Job_OCID>
API Method GET
Sample Response Body 202 OK

Delete Stream Job
Attribute Value
API Endpoint /latest/streamJobs/<Stream_Job_OCID>
API Method DELETE
Sample Response Body 202 OK

Delete Stream Source
Attribute Value
API Endpoint /latest/streamSources/<Stream_Job_OCID>
API Method DELETE
Sample Response Body 202 Accepted

Delete Private Endpoint
Attribute Value
API Endpoint /latest/visionPrivateEndpoint/<Stream_Job_OCID>
API Method DELETE
Sample Response Body 202 Accepted

Complete end-to-end working examples are available in LiveLab.

Multicamera Tracking
Note

This is ONLY available for stream jobs using Object Tracking (limited to faces). This is an optional feature.
Stream Group
Attribute Value
API Endpoint /latest/streamGroups
API Method POST
Sample Request Body
{
  "compartment_id": "<valid compartment OCID>",
  "display_name": "human readable display name",
  "is_enabled": true,
  "stream_overlaps": [
    {
      "overlapping_streams": [<subset of stream_source_ids that overlap in field of view>]
    }
  ],
  "stream_source_ids": [
    <List of valid streamSource OCIDs>
  ],
  "freeformTags": {
        "oci-freeform": ""
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    }
}
Sample Response Body 200 OK
{
  "compartment_id": "<valid compartment OCID>",
  "display_name": "human readable display name",
  "id": "<StreamGroup OCID>",
  "is_enabled": true,
  "lifecycle_state": "ACTIVE",
  "stream_overlaps": null,
  "stream_source_ids": [
    <List of valid streamSource OCIDs>
  ],
  "time_created": "2025-07-17T23:39:18.264000+00:00",
  "time_updated": "2025-07-17T23:39:18.264000+00:00",
  "freeformTags": {
        "oci-freeform": "xyz"
    },
    "definedTags": {
        "Oracle-Tags": {
            "CreatedBy": "<OCID>",
            "CreatedOn": "<time stamp>"
        }
    },
    "systemTags": {}
}

For full CRUD Multicamera Tracking APIs, see the StreamGroup API specification.

Results and Output

Feature Output
Label detection

Label, confidence, timestamp

Object detection

Label and bounding box, confidence

Text detection

Transcription and bounding box

Face detection

Bounding box, face metadata

Object tracking

ObjectID and tracked bounding boxes over time

Recommendations for Best Performance

  • Camera produces a consistent frame rate of 30 FPS.
  • Camera resolution no greater than 720p
  • Provide consistent, well-lit environments
  • Maintain a subject proximity of 15–20 meters