Remote Streaming
Stream Aria Gen2 data directly to a remote server over the internet, without requiring a local relay machine.
This page uses the HTTP transport — the device POSTs to an HTTPS endpoint you run, the same transport as USB, WiFi router and hotspot streaming. If you want the device and receiver to reach each other across networks without standing up an HTTPS ingest server, WebRTC Streaming does that through a signaling server instead.
Prerequisites
- Client SDK installed and virtual environment activated
- Device authenticated with your PC
- Device connected to a Wi-Fi network with internet access
- An HTTPS server accessible from the internet (public IP or domain)
- Port 6768 open on the server firewall
Before using any streaming or recording commands, you must authenticate your device by running aria_gen2 auth pair (see Device Authentication). This only needs to be done once per device-PC combination, but all SDK operations will fail without it. You can verify your authentication status at any time with aria_gen2 auth check.
Overview
By default, Aria streams data to a local development machine via USB or WiFi on the same network. With remote streaming, you can configure the glasses to send data directly to a cloud server over the internet.
Use cases:
- Field deployments: Collect data without carrying a laptop
- Centralized collection: Aggregate data from multiple devices to one server
- Cloud processing: Build real-time processing pipelines in the cloud
- Remote monitoring: Monitor device streams from anywhere
Architecture Comparison
Local Streaming (default, HTTP transport):
┌─────────────────┐ USB/WiFi ┌─────────────────┐
│ Aria Glasses │ ─────────────► │ Local Machine │
│ │ Same Network │ (Client SDK) │
└─────────────────┘ └─────────────────┘
Remote Streaming (HTTP transport):
┌─────────────────┐ WiFi/Internet ┌─────────────────┐
│ Aria Glasses │ ───────────────► │ Cloud Server │
│ │ HTTPS POST │ (Your Backend) │
└─────────────────┘ └─────────────────┘
Server Setup
Step 1: Locate Streaming Certificates
The streaming certificates are generated when you first set up the Client SDK. Find them at:
~/.aria/streaming-certs/persistent/
├── subscriber.pem # Server certificate
├── subscriber-key.pem # Server private key
└── root_ca.pem # CA certificate
Step 2: Copy Certificates to Server
Transfer the certificate files to your cloud server:
scp ~/.aria/streaming-certs/persistent/subscriber.pem user@your-server:/path/to/certs/
scp ~/.aria/streaming-certs/persistent/subscriber-key.pem user@your-server:/path/to/certs/
Step 3: Create HTTPS Server
Your server must use the Aria streaming certificates for HTTPS. Here's a minimal Python example:
#!/usr/bin/env python3
"""Minimal HTTPS server for Aria remote streaming."""
import ssl
import json
from http.server import HTTPServer, BaseHTTPRequestHandler
CERT_PATH = "/path/to/certs/subscriber.pem"
KEY_PATH = "/path/to/certs/subscriber-key.pem"
class AriaStreamHandler(BaseHTTPRequestHandler):
def do_POST(self):
# Read streaming data
content_length = int(self.headers.get('Content-Length', 0))
data = self.rfile.read(content_length)
# Access metadata from headers
session_id = self.headers.get('session-id')
device_serial = self.headers.get('device-serial')
calibration = self.headers.get('oatmeal-calibration')
print(f"Received {len(data)} bytes from device {device_serial}")
# TODO: Process your streaming data here
# Send response
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
self.wfile.write(b'{"status": "ok"}')
def main():
server = HTTPServer(('0.0.0.0', 6768), AriaStreamHandler)
# Configure SSL with Aria certificates
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ctx.load_cert_chain(CERT_PATH, KEY_PATH)
server.socket = ctx.wrap_socket(server.socket, server_side=True)
print("Aria streaming server listening on https://0.0.0.0:6768")
server.serve_forever()
if __name__ == "__main__":
main()
Step 4: Open Firewall Port
Ensure port 6768 is accessible from the internet:
# Ubuntu/Debian
sudo ufw allow 6768/tcp
# AWS Security Group (example)
aws ec2 authorize-security-group-ingress \
--group-id sg-xxxxx \
--protocol tcp \
--port 6768 \
--cidr 0.0.0.0/0
Client Configuration
Using the CLI
Start streaming with a custom endpoint URL:
aria_gen2_cli streaming start \
--url "https://your-server.com:6768" \
--interface wifi_sta \
--batch-period-ms 200 \
--no-verify-server-certs
Parameters:
| Parameter | Description |
|---|---|
--url | Your server's HTTPS endpoint |
--interface wifi_sta | Use WiFi station mode for internet access |
--batch-period-ms | Message batching for thermal management |
--no-verify-server-certs | Skip server certificate verification (this is the default for HTTP streaming; pass --verify-server-certs to require a valid certificate) |
Using the Python SDK
import aria.sdk_gen2 as sdk
# Connect to device
device_client = sdk.DeviceClient()
device = device_client.connect()
# Configure remote streaming
config = sdk.HttpStreamingConfig()
config.profile_name = "profile9"
config.streaming_interface = sdk.StreamingInterface.WIFI_STA
config.batch_period_ms = 200
config.advanced_config.endpoint.url = "https://your-server.com:6768"
config.advanced_config.endpoint.verify_server_certificates = False
# Apply configuration and start streaming
device.set_streaming_config(config)
device.start_streaming()
# ... streaming active ...
# Stop when done
device.stop_streaming()
Data Format
The glasses send HTTP POST requests to your server endpoint.
Request Headers
| Header | Description | Example |
|---|---|---|
session-id | Unique UUID for the streaming session | 597b9aec-079a-4ca3-bc6c-98bf10f6aa33 |
device-serial | Device identifier | 1M0YDB6H7Y0110 |
device-build | Firmware version | 51048810021100500 |
oatmeal-calibration | JSON with camera/sensor calibration | See below |
Transfer-Encoding | Always chunked | chunked |