How blackwacth/iptv-api works
IPTV-API gathers live-stream candidates from configurable local and network sources, normalizes them by channel, measures and filters stream quality, then writes playlist/API results and optionally serves them. The README documents RTMP/HLS, EPG, aliases, custom templates, and scheduling; sampled excerpts confirm orchestration, source-request behavior, channel processing, speed testing, and HTTP/RTMP service behavior. Several source-to-orchestrator links and unsampled capabilities are represented at the module level because the excerpts do not show all wiring.
Main entry points: main.py Update scheduler · app.py Result and playback service · tkinter_ui.py Desktop controls · request.py Hotel discovery
Components 19
Entry and settings
- Update scheduler
main.py - Desktop controls
tkinter_ui/tkinter_ui.py - Runtime settings
utils/config.py
Stream discovery
- Local sources
tkinter_ui/local.py - Subscription fetch
updates/subscribe/request.py - Hotel discovery
updates/hotel/request.py - Multicast discovery
updates/multicast/request.py - FOFA discovery
updates/fofa/request.py - Keyword search
updates/online_search/request.py
Channel processing
- Channel normalization
utils/channel.py - Channel aliases
utils/alias.py - Stream validation
utils/speed.py - Program guide
updates/epg/request.py - Result metadata
utils/db.py
Results and playback
- Playlist generation
utils/channel.py - Result and playback service
service/app.py - RTMP HLS relay
service/app.py
Other components
- Operator
- IPTV viewer
Connections 22
- Operator → Desktop controls: configures
- Operator → Update scheduler: starts update
- Desktop controls → Runtime settings: updates settings
- Update scheduler → Runtime settings: reads settings
- Update scheduler → Local sources: loads sources
- Update scheduler → Subscription fetch: dispatches fetch
- Update scheduler → Hotel discovery: dispatches search
- Update scheduler → Multicast discovery: dispatches search
- Update scheduler → Keyword search: dispatches search
- Hotel discovery → FOFA discovery: queries FOFA
- Multicast discovery → FOFA discovery: queries FOFA
- Update scheduler → Channel normalization: combines channels
- Update scheduler → Channel aliases: applies aliases
- Update scheduler → Stream validation: tests streams
- Update scheduler → Program guide: fetches guide
- Update scheduler → Result metadata: stores metadata
- Update scheduler → Playlist generation: writes results
- IPTV viewer → Result and playback service: requests playlist
- Result and playback service → Playlist generation: reads result files
- Result and playback service → Result metadata: reads stream data
- Result and playback service → RTMP HLS relay: starts relay
- RTMP HLS relay → IPTV viewer: serves stream