POV video streaming from Mentra smart glasses with verifiable analytics powered by Eigen-TEE.
EigenStream is a complete system for streaming first-person video from Mentra smart glasses to a public dashboard with real-time analytics. All video processing and analytics are cryptographically attested by a Trusted Execution Environment (TEE).
Perfect for demo days, live events, security monitoring, sports recording, and any POV streaming use case.
- Generic glasses app: Fully customizable for any use case (security, events, sports, etc.)
- Live video streaming: RTMP ingestion with HLS transcoding for browser playback
- Real-time RTMP streaming from Mentra glasses to TEE backend
- Live video player: Watch the stream in real-time on public dashboard
- Verifiable analytics: Audio/video analysis with cryptographic attestations
- Live dashboard: Real-time pitch tracking and activity metrics
- Beautiful UI: Modern, responsive design with start/stop controls
- Auto-restart: Handles errors gracefully with automatic retry
- Secure storage: All processing happens inside the TEE
EigenStream/
βββ glasses-app/ # Web app for Mentra glasses
β βββ config.js # βοΈ Customize for your use case
β βββ index.html
β βββ app.js
β βββ CUSTOMIZE.md # Customization guide
βββ tee-backend/ # TEE backend with HLS transcoding
β βββ src/
βββ dashboard/ # Public dashboard with video player
β βββ src/
βββ LICENSE # GPL v3
See COMPLETE_SETUP_GUIDE.md for:
- Detailed deployment steps
- Mentra console configuration
- Testing checklist
- Troubleshooting guide
- API documentation
Step 1: Deploy Glasses App
- Push this repo to GitHub
- Import to Vercel (root:
glasses-app) - Copy deployment URL
Step 2: Configure Mentra Console
- Go to https://console.mentraglass.com
- Create/edit your app
- Set Server URL to Vercel URL from Step 1
- Install app on glasses
Step 3: Start Backend
cd tee-backend
npm install
npm run devStep 4: Use the App
- Ensure glasses and computer on same WiFi
- Launch app on glasses
- Tap "Start Stream"
- Watch video + analytics on dashboard
Edit glasses-app/config.js to customize for your use case:
const APP_CONFIG = {
appName: "Your App Name",
appIcon: "π₯",
subtitle: "Your Tagline",
rtmpUrl: "rtmp://your-server:1935/live/stream",
// ... more options
};See glasses-app/CUSTOMIZE.md for examples:
- Security monitoring
- Live events
- Sports recording
- Customer support
- Industrial inspection
Mentra Glasses (Web App from Vercel)
β
User taps "Start Stream"
β
RTMP Stream β Backend (localhost:1935)
β
βββββββββββββββββββββββββββββββββββββββ
β TEE Backend (localhost:8000) β
β βββββββββββββββββββββββββββββββββ β
β β RTMP Ingestion (FFmpeg) β β
β βββββββββββ¬ββββββββββββββββββββββ β
β ββββ HLS Transcoding β
β β (playlist.m3u8) β
β β β
β ββββ Analysis Pipeline β
β β’ Audio detection β
β β’ Scene changes β
β β’ Motion analysis β
β βββββββββββββββββββββββββββββββββ β
β β Attestation Service β β
β β (Crypto signing) β β
β βββββββββββββββββββββββββββββββββ β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
β
Dashboard (Vercel)
βββ HLS Video Player (hls.js)
βββ Real-time Analytics (WebSocket)
curl -fsSL https://tools.eigencloud.xyz | basheigenx login# Build the TEE backend Docker image
cd tee-backend
docker build -t eigenstream-tee .
# Tag for your registry
docker tag eigenstream-tee:latest [YOUR-USERNAME]/eigenstream-tee:latest
# Deploy to EigenCompute
eigenx app deploy [YOUR-USERNAME]/eigenstream-tee:latestAfter deployment, EigenX will provide you with:
- TEE HTTPS endpoint: Use this for the dashboard
- Public IP: Use this for Mentra RTMP configuration
Update your Mentra glasses to point to: rtmp://[TEE-PUBLIC-IP]:1935/live/eigenstream
Health Check
GET /healthGet Live Stats
GET /api/stats
Response: { totalPitches, currentPitch, currentActivityLevel, attestation, ... }Start New Pitch
POST /api/pitch/startEnd Current Pitch
POST /api/pitch/endGet TEE Address
GET /api/tee/address
Response: { address: "0x...", message: "..." }Verify Attestation
POST /api/tee/verify
Body: { attestation: {...} }
Response: { valid: true/false }Connect to ws://[SERVER]/ for real-time updates:
Events:
initial-state: Current stats on connectionstats-update: Live stats updatespitch-started: New pitch eventpitch-ended: Pitch completion event
- Deploy TEE to EigenCompute
- Configure Mentra glasses with TEE RTMP endpoint
- Open dashboard on projector/screen
- Test stream with glasses
Manual Control:
- Click "Next Pitch" button when a new presenter starts
- Click "End Pitch" when they finish
Voice Control (Future):
- Say "next pitch" to advance
- Automatic detection based on scene changes
What Gets Tracked:
- Pitch count and duration
- Audio activity levels
- Motion/energy in frame
- Scene changes (new presenters)
All data is cryptographically signed by the TEE!
- Raw video stored in TEE
- Complete playback available
- Full audit trail
- Use for: Internal docs, compliance
- Video analyzed in real-time
- No raw footage stored
- Only metadata + attestations
- Use for: Privacy demos, GDPR showcase
- Backend: Node.js, TypeScript, Express
- Stream Processing: FFmpeg
- Analysis: Custom audio/video analyzers
- Attestation: ethers.js cryptographic signing
- Frontend: React, Vite
- Deployment: Docker, EigenCompute TEE
- Blockchain: Base (optional on-chain attestations)
- Check Mentra glasses network connection
- Verify RTMP URL is correct (including port 1935)
- Check TEE firewall allows port 1935
- Test with local RTMP stream first
- Check WebSocket connection in browser console
- Verify API_URL and WS_URL in dashboard .env
- Ensure TEE backend is running
- Make sure FFmpeg is installed in Docker container
- Check video/audio codec compatibility
- Verify RTMP stream format from glasses
- Basic RTMP streaming
- Real-time analytics dashboard
- Cryptographic attestations
- Voice command detection ("next pitch")
- Base blockchain integration
- Privacy-preserving highlights
- Automatic pitch detection (no manual control)
- Multi-stream support (multiple glasses)
- NFT minting for key moments
- Glasses App: Vanilla JS with Mentra SDK
- Backend: Node.js, TypeScript, Express, FFmpeg
- Stream Processing: RTMP ingestion, HLS transcoding
- Analysis: Custom audio/video analyzers
- Attestation: ethers.js cryptographic signing
- Frontend: React, Vite, hls.js
- Deployment: Vercel (apps), Docker (backend)
This project is open source under GPL v3. Fork, extend, and share your improvements!
Requirements for derivatives:
- Keep source code open
- Use GPL v3 license
- Give credit to original author
- Share your modifications
GNU General Public License v3.0
Copyright (C) 2025 Erin Magennis
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENSE for full terms.
Summary:
- β Use for any purpose, study, modify, share, use commercially
- β Must keep source open, use GPL v3, give credit, share modifications
- β Cannot make closed source, remove attribution, or use restrictive license
For issues or questions:
- EigenCloud Docs: https://docs.eigencloud.xyz
- Mentra Docs: https://docs.mentraglass.com
- GitHub Issues: https://github.com/[YOUR_USERNAME]/eigenstream