ac0669165668d87ef81b1b06b349519e215d2be6
Backend samples /proc/{pid}/stat every 2s to calculate CPU usage of
each ffmpeg process and exposes ffmpeg_pid + ffmpeg_cpu_pct in stats().
Dashboard shows a cyan ffmpeg badge with live CPU% per stream row,
plus a new StatCard with total ffmpeg CPU across all active streams.
KiraTV
Sistema de proxy y gestión IPTV con soporte multiusuario y fan-out de streams.
Stack
- Backend: Python 3.13 + FastAPI + asyncio
- Base de datos: PostgreSQL 17 + SQLAlchemy 2 + Alembic
- Cache / estado: Redis 8
- Frontend: React 18 + Vite + TailwindCSS
- Proxy inverso: Nginx
Características
- Compatible con API Xtream Codes (TiviMate, Smarters, IPTV Pro…)
- Fan-out de streams: N usuarios ven el mismo canal → 1 solo slot del proveedor
- Soporte multi-cuenta del mismo proveedor con balanceo de slots
- Catálogos personalizados por usuario (live, VOD, series)
- Integración Jellyfin: biblioteca local como categorías KiraTV
- EPG XMLTV con merge por tvg-id
- Dashboard en tiempo real (WebSocket): qué usuario ve qué canal y qué slot usa
- Reconexión automática con detección de stall y A/V sync garantizado
Instalación
cp .env.example /opt/kirastream/.env
# Editar .env con tus valores reales
cd /opt/kirastream/frontend
npm install && npm run build
cd /opt/kirastream
python3 -m venv venv
venv/bin/pip install -r backend/requirements.txt
venv/bin/python -m alembic upgrade head
Configuración
Ver .env.example para todas las variables disponibles.
La configuración de Nginx está en nginx/kirastream.conf.
El servicio systemd está en kirastream.service.
Description
Languages
Python
55.2%
TypeScript
44.1%
Shell
0.3%
HTML
0.2%
JavaScript
0.1%