A modern web-based IPTV player with Electronic Program Guide (EPG) support, featuring a Spotify-inspired dark theme and advanced streaming capabilities.
- HLS Support: Native HLS.js integration for
.m3u8streams - MPEG-TS Support: mpegts.js for raw transport streams
- Smart Detection: Automatic stream format detection and fallback
- CORS Bypass: HTTP server setup to avoid browser CORS restrictions
- Real-time EPG: Fetches program guide data from XMLTV feeds
- Smart Caching: 30-minute cache with persistent storage
- Channel Matching: Uses exact
tvg-idfrom M3U files for accurate EPG lookup - Current/Next Programs: Highlights current and upcoming shows
- Spotify Theme: Dark black and green color scheme
- Responsive Design: Works on desktop and mobile devices
- Scrollable Channels: Compact channel list with proper scrolling
- Channel Logos: Support for channel logos with fallback emojis
- Auto-load: Automatically loads
channels_filtered.m3uon startup - Manual Upload: File picker for custom M3U files
- M3U Parsing: Full support for M3U playlist format with metadata
Try it now: https://web-iptv.github.io/iptv/
- Node.js (for EPG server)
- Python 3 (for EPG fetching script)
- Modern web browser
-
Clone the repository
git clone <repository-url> cd iptv
-
Install dependencies
npm install express cors dotenv
-
Configure environment (optional)
# Copy the example environment file cp env.example .env # Edit .env with your settings nano .env
-
Start the servers
# Terminal 1: Start EPG server node epg-server.js # Terminal 2: Start HTTP server python3 -m http.server 8080
-
Open the application
http://localhost:8080/web-iptv.html
# Start the server
python3 -m http.server 8080
# In another terminal, create public tunnel
./ngrok-tunnel.sh# Start with external access script
./start-external.sh- Find your local IP:
192.168.1.103 - Configure router port forwarding:
- External Port:
8080 - Internal IP:
192.168.1.103 - Internal Port:
8080
- External Port:
- Access via:
http://YOUR_EXTERNAL_IP:8080/web-iptv.html
- Local:
http://localhost:8080/web-iptv.html - Network:
http://192.168.1.103:8080/web-iptv.html - External:
http://107.142.214.21:8080/web-iptv.html(after port forwarding) - ngrok:
https://random-id.ngrok.io/web-iptv.html(temporary public URL) - GitHub Pages:
https://web-iptv.github.io/iptv/(permanent public hosting)
Your IPTV player is automatically deployed to GitHub Pages whenever you push to the main branch.
Live URL: https://web-iptv.github.io/iptv/
- Go to your repository Settings
- Scroll to Pages section
- Under Source, select "Deploy from a branch"
- Select main branch and / (root) folder
- Click Save
- ✅ Free hosting with custom domain support
- ✅ HTTPS enabled by default
- ✅ Automatic deployment on every push
- ✅ CDN distribution for fast global access
- ✅ Custom 404 pages and redirects
⚠️ EPG server not available (client-side only)⚠️ Sample playlists only (no local M3U files)
- Automatic: The app loads the configured M3U file automatically
- Manual: Click "📁 Upload M3U File" to select a custom playlist
- Reload: Click "🔄 Load Default Playlist" to reload the default file
- Settings: Click "⚙️ Settings" to configure paths and options
- Click any channel in the list to start streaming
- The player automatically detects the best streaming method
- Use video controls for play/pause, mute, and fullscreen
- View EPG: Select a channel to see its program guide
- Toggle Panel: Use "Hide/Show" button to collapse the EPG panel
- Current Program: Shows what's currently airing with "🔴 NOW" indicator
- Upcoming: Lists next programs with times
Click the "⚙️ Settings" button to access the configuration panel:
- M3U File Name: Local file name for the playlist
- M3U URL: Remote URL for online playlists
- HTTP Server Port: Port for the web server (default: 8080)
- EPG Server Port: Port for the EPG server (default: 3001)
- EPG Script Path: Path to your Python EPG script
- EPG URL: URL for XMLTV EPG data
- Cache Duration: How long to cache EPG data (minutes)
- Theme: Choose between Spotify Dark, Classic, or Minimal
- Channel Logo Size: Small (24px), Medium (40px), or Large (60px)
- Save Settings: Persist current configuration
- Reset to Defaults: Restore factory settings
- Export/Import: Backup and restore settings as JSON files
- Clear EPG Cache: Remove cached EPG data
- Test EPG Connection: Verify EPG server connectivity
- Reload Configuration: Apply settings changes
iptv/
├── web-iptv.html # Main web application
├── epg-server.js # EPG server with caching
├── channels_filtered.m3u # Default channel playlist
├── package.json # Node.js dependencies
└── README.md # This file
The EPG system uses your Python script at /Users/harshalkutkar/epg_fetch.py:
# Test EPG fetching
python3 /Users/harshalkutkar/epg_fetch.py bbcone.nl --limit 5GET /api/epg/:channelId- Fetch EPG for a channelGET /api/cache/status- View cache statusDELETE /api/cache- Clear cacheGET /api/health- Health check
The player supports standard M3U format with extended metadata:
#EXTM3U
#EXTINF:-1 tvg-id="bbcone.nl" tvg-name="UK| BBC ONE HD" tvg-logo="https://example.com/logo.png" group-title="UK Channels",UK| BBC ONE HD
http://example.com/stream.m3u8tvg-id: Channel ID for EPG matchingtvg-name: Display nametvg-logo: Channel logo URLgroup-title: Channel category
- Format:
.m3u8playlists - Library: HLS.js
- Features: Adaptive bitrate, low latency mode
- Format: Raw
.tsstreams - Library: mpegts.js
- Features: Live streaming, CORS support
- Format: Direct video URLs
- Fallback: HTML5 video element
- Features: Native browser support
- Duration: 30 minutes
- Storage: Persistent JSON file (
epg-cache.json) - Benefits: Faster loading, reduced API calls
# View cache status
curl http://localhost:3001/api/cache/status
# Clear cache
curl -X DELETE http://localhost:3001/api/cache- Ensure you're accessing via
http://localhost:8080notfile:// - Check that both servers are running
- Check browser console for errors
- Verify stream URL is accessible
- Try different streaming methods (HLS vs MPEG-TS)
- Verify Python script is accessible at
/Users/harshalkutkar/epg_fetch.py - Check EPG server logs for errors
- Test EPG endpoint directly:
curl http://localhost:3001/api/epg/bbcone.nl
- Modify
web-iptv.htmlfor UI changes - Update
epg-server.jsfor server-side changes - Test with different M3U files and stream formats
- Theme: Modify CSS variables in
web-iptv.html - EPG Source: Update Python script path in
epg-server.js - Cache Duration: Change
CACHE_DURATIONinepg-server.js
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Enjoy your IPTV streaming experience! 🎬📺