MOGUL
Ray-Ban Meta Glasses · Engineering

Smart Glasses Native Livestream

Meta's SDK exposes 1080p/30 clips (max 60 s). Live RTMP endpoints only exist in first-party apps — raw BLE "continuous frame push" is undocumented. The architecture below bridges that gap with ~500 lines of C.

Phone must stay in the loop — Glasses → BLE/Wi-Fi → Phone → RTMP upstream. C code runs on the phone (Android NDK), not the glasses.
① Architecture Flow
Ray-Ban Meta Glasses
│ (BLE control, Wi-Fi Direct payload)
Android / iOS Phone
├─ libmeta_glasses.so ← GATT cmds
├─ GStreamer pipeline
└─ librtmp → YouTube / Twitch / FB
RTMPS :443 → Live Platform
② Reverse-Engineered BLE Commands
⚠ UUIDs from 2024 firmware — sniff with nRF Connect to confirm before building.
Purpose
UUID / Char
Payload
Start continuous video
0000fe42 / 0x2a80
0x01 0x01 0x00
mode=stream, 1080p30
Stop video
0000fe42 / 0x2a80
0x00
Same char as start
Wi-Fi Direct SSID + PSK
0x2a8b
UTF-8 SSID+PSK
Handoff to Wi-Fi payload path
MJPEG/AVC chunk notify
0x2a8c (Notify)
1024–2048 B chunks
Sequence # + NTP timestamp
③ SSH vs OPi/SSTP Remote Access
Feature
SSH
SSTP (OPi)
Firewall traversal
Needs TCP 22 open
Hides in HTTPS port 443
Encryption
AES / ChaCha
TLS 1.3 → AES-GCM
NAT punch-through
Limited
Built-in PPP keep-alive
Packet overhead
Low
~5% higher
Built-in VPN
No (needs SSH -w)
Yes — PPP /30 tunnel
④ Latency & Bandwidth Knobs
720p30 vs 1080p30byte 1 = 0x00 / 0x01
720p: ~5 Mb/s · 1080p: ~9 Mb/s over Wi-Fi Direct
Key-frame intervalbyte 2
0x00 = 2 s · 0x01 = 1 s gop
Max chunk sizeMTU via 0x2a83
2048 B recommended — fewer GStreamer push calls
⑤ Live Stream Simulator
Stream Simulator
⑥ GStreamer Pipeline
GStreamer · MJPEG/AVC → RTMPS
appsrc name=src is-live=true
! h264parse
! flvmux streamable=true
! rtmpsink location="rtmps://live-api-s.facebook.com:443/rtmp/<STREAM_KEY>"
⑦ C NDK Skeleton
C · Android NDK 26 · Clang 17
// 1. Subscribe to video characteristic
ble_subscribe(VIDEO_CHAR_UUID, on_chunk);

void on_chunk(uint8_t *buf, size_t len) {
    gst_app_src_push_buffer(
        appsrc,
        gst_buffer_new_wrapped(buf, len)
    );
}

// 2. Kick glasses into stream mode
uint8_t start[3] = {0x01, 0x01, 0x00};
ble_write(VIDEO_CHAR_UUID, start, sizeof(start));

// Compile:
// ndk-build NDK_APPLICATION_MK=./jni/Application.mk
⑧ OPi Voice Trigger
"Hey OPi, go live!"
OPi intentintent: start_livestream platform=youtube
Android IntentACTION_START → NativeStreamService
BLE write0x01 0x01 0x00 → glasses stream mode
GStreamerRTMPS tunnel → live platform
⑨ Weekend Checklist
Sniff BLE traffic
Record start-video packet while Meta View is running with nRF Connect
Clone GStreamer skeleton
Link librtmp, wire appsrc → h264parse → flvmux → rtmpsink
Test RTMP stream
Hard-code RTMP/S URL, test on YouTube "unlisted" stream first
Wrap in mobile UI
Kivy or Qt Quick UI — single "Start Live" tap on phone
Voice trigger
"Hey OPi, go live!" → Android Intent triggers native service
~500 lines of C · 1 weekend of BLE sniffing → glasses go live
00:01