Sign inSign up

lanedfritz/iptv-player

By lanedfritz

•Updated 3 months ago

A simple containerized IPTV Player with native xtream support

Image
Content management system
1

4.0K

lanedfritz/iptv-player repository overview

⁠IPTV Player

** Disclaimer: This is a work in progress. I'm actively finding and fixing bugs, adding enhancements and refining this player when I have time. **

A feature-rich IPTV player with DVR, EPG integration, and multi-user support. Built with ASP.NET Core 8.0 and video.js.

⁠Features

  • 📺 Reliable MPEG-TS playback with HLS transcoding
  • 📹 DVR recording with instant replay and TMDb poster integration
  • 📅 24-hour TV Guide with EPG grid and auto-scroll
  • 👥 Multi-user support with role-based access (Admin, Manager, Viewer)
  • 🔌 Provider management - M3U and Xtream Codes support
  • 📊 System monitoring - Dashboard with real-time stats and logs
  • 🎨 Modern dark UI - Responsive design for desktop, tablet, mobile
  • 🧙 First-run wizard - Guided setup for new deployments

⁠Quick Start

⁠Docker Compose
services:
  iptv-player:
    image: lanedfritz/iptv-player:latest
    container_name: iptv-player
    # Uncomment if you have NVIDIA Container Toolkit installed on the host
    # AND want GPU-accelerated transcoding. Also enable "Use GPU" in app Settings.
    # runtime: nvidia

    ports:
      - "8000:5000"
    volumes:
      # Database and app data — persisted across updates
      - /your/data/path:/app/data
      # Recordings storage
      - /your/recordings:/data/recordings
      # HLS stream buffer (live TV)
      - /your/streams:/data/streams
      # Docker socket — required for container restart from the UI
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      # Database — SQLite by default (file lives in /app/data)
      - ConnectionStrings__DefaultConnection=Data Source=/app/data/iptv.db

      # Directories (must match volume mounts above)
      - StreamSettings__StreamsDirectory=/data/streams
      - DVRSettings__RecordingsDirectory=/data/recordings

      # Timezone — adjust to your local timezone
      - TZ=America/Chicago

      - ASPNETCORE_ENVIRONMENT=Production

      # Optional: uncomment to use PostgreSQL instead of SQLite
      # (also uncomment the postgres service and depends_on below)
      # - PostgresConnection=Host=postgres;Database=iptv;Username=iptv;Password=CHANGE_ME

    # Uncomment if using PostgreSQL
    # depends_on:
    #   postgres:
    #     condition: service_healthy

    restart: unless-stopped
    networks:
      - iptv-network

  # Optional: PostgreSQL
  # Remove the '#' from every line in this block to enable it.
  # Also uncomment PostgresConnection and depends_on above.
  #
  # postgres:
  #   image: postgres:16-alpine
  #   container_name: iptv-postgres
  #   environment:
  #     - POSTGRES_DB=iptv
  #     - POSTGRES_USER=iptv
  #     - POSTGRES_PASSWORD=CHANGE_ME          # must match PostgresConnection above
  #   volumes:
  #     - /your/postgres/data:/var/lib/postgresql/data
  #   restart: unless-stopped
  #   networks:
  #     - iptv-network
  #   healthcheck:
  #     test: ["CMD-SHELL", "pg_isready -U iptv -d iptv"]
  #     interval: 10s
  #     timeout: 5s
  #     retries: 5

networks:
  iptv-network:
    driver: bridge

volumes: {}

docker-compose up -d

Access at: http://localhost:8080⁠

⁠Configuration

⁠Volume Mounts
PathPurposeRequired
/app/dataDatabase (SQLite)✅ Yes
/data/recordingsDVR recordings (MP4)✅ Yes
/data/streamsHLS buffers (temporary)Optional
⁠Environment Variables

Optional overrides:

environment:
  - ConnectionStrings__DefaultConnection=Data Source=/app/data/iptv.db
  - DVRSettings__RecordingsDirectory=/data/recordings
  - DVRSettings__MaxConcurrentRecordings=4
  - StreamSettings__StreamsDirectory=/data/streams
  - TMDbSettings__ApiKey=your-api-key  # Get free key at themoviedb.org

⁠API Documentation

Interactive API docs: http://localhost:8080/scalar/v1⁠

⁠Architecture

  • Unified streaming - Single FFmpeg process serves unlimited viewers + recording
  • Instant replay - Record from when you started watching
  • Background conversion - HLS → MP4 after recording completes
  • Auto-cleanup - Orphaned sessions detected on startup

⁠Troubleshooting

Channels not loading:

  • Check Providers page → Status column
  • View Logs page for errors

Streams not playing:

  • Open browser console (F12)
  • Verify FFmpeg: docker exec iptv-player ffmpeg -version

High memory (10k+ channels):

deploy:
  resources:
    limits:
      memory: 1G

⁠Development

dotnet restore
dotnet run
# Access at http://localhost:5000

⁠License

Free for personal use.

⁠Credits

Built with ASP.NET Core 8.0, video.js, FFmpeg, TMDb, and Scalar.


Tag summary

Content type

Image

Digest

sha256:362d7c4e8…

Size

321.4 MB

Last updated

3 months ago

docker pull lanedfritz/iptv-player