OTVI – Open TV Interface
OTVI is a generic, YAML-driven television interface that lets any TV provider expose login, logout, channel browsing, and live playback (HLS / DASH + DRM) through simple configuration files. No custom code is needed per provider — just describe the API in a YAML file.
Key Features
- Zero-code provider integration — define everything in YAML
- Hot-reload — edit a provider YAML and the server picks it up within ~300 ms, no restart needed
- Multi-step authentication — phone + OTP, email + password, SSO, and more
- Template engine — dynamic request building with
{{input.X}},{{stored.X}},{{uuid}}, with warnings logged for any unresolved placeholders - Full JSONPath extraction — pull values from API responses using filter expressions, recursive descent, and wildcards (powered by
jsonpath-rust) - HLS & DASH streaming — with full DRM support (Widevine, PlayReady)
- Stream proxying — transparent CDN authentication and CORS handling
- Multi-user system — JWT-based auth with admin/user roles
- Password policy — min 8 chars, uppercase, digit; enforced consistently across registration, change-password, and admin reset
must_change_passwordenforcement — admin-created accounts are blocked from all API calls until the user sets a personal password- Per-user provider access control — restrict which providers each user can access
- Channel search & pagination — server-side text search (
?search=) and limit/offset pagination on channel lists - Database flexibility — SQLite or PostgreSQL at runtime
- Health & readiness probes —
/healthz(liveness) and/readyz(DB check) for orchestrators - Provider JSON Schema — live
GET /api/schema/providerendpoint for VS Code YAML auto-complete - Structured logging — human-readable text by default; set
LOG_FORMAT=jsonfor Loki / Datadog - Configurable CORS — permissive in dev, locked to specific origins in production via
CORS_ORIGINS - Modern web UI — responsive Leptos/WASM frontend with URL-driven channel search/filter state, skeleton loading states, and backend-supplied channel metadata in the player
- Docker ready — multi-stage build with built-in
HEALTHCHECK, optimised release profile (LTO, symbol strip)
How It Works
- Provider YAML configs are loaded at server startup and watched for changes — any create, modify, or delete of a
.yaml/.ymlfile is picked up automatically without restarting. - The Axum-based REST API proxies requests to external provider APIs based on the YAML definitions.
- The Leptos WASM frontend communicates with the REST API to display providers, drive overlay-based OTVI auth, browse channels using URL query state, and play streams.
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Rust + Axum |
| Frontend | Rust/WASM via Leptos + Tailwind CSS |
| Async Runtime | Tokio |
| HTTP Client | Reqwest |
| Database | SQLx (SQLite / PostgreSQL) |
| JSONPath | jsonpath-rust |
| JSON Schema | schemars |
| File Watching | notify |
| Build | Cargo + Trunk (WASM bundler) |
| Auth | JWT + Argon2id password hashing |
| Containerization | Docker (multi-stage build, built-in health check) |
Project Structure
License
OTVI is licensed under AGPL-3.0-only. See LICENSE for details.