A modern IPTV player built with PySide6
Project description
PyIPTV
A Modern Python IPTV Player
Feature-rich IPTV player built with PySide6/Qt6 for streaming live television content from M3U playlists
โจ Features
Core Functionality
- ๐บ M3U Playlist Support - Load and manage IPTV playlists in M3U format
- ๐ก Xtream Codes API - Native support for Xtream-panel providers with server-side categories and on-device caching
- ๐จ Modern Qt6 Interface - Built with PySide6 for a responsive, native desktop experience
- ๐ Category Organization - Automatically organize channels by categories
- ๐ Search & Filtering - Quickly find channels with real-time search
- ๐ต Audio Track Selection - Multi-language audio track support
User Experience
- ๐ Theme Support - System-aware theming with KDE integration
- โก Performance Optimized - Handles large playlists with virtualized lists and smart buffering
- โ๏ธ Settings Management - Persistent settings with user-friendly configuration
- ๐ฅ๏ธ High DPI Support - Optimized for high-resolution displays
๐ Installation
From PyPI (Recommended)
pip install pyiptv
Using uvx (Isolated execution)
uvx pyiptv
From Source
git clone https://github.com/dmarkey/PyIPTV.git
cd PyIPTV
pip install -e .
๐ Usage
Basic Usage
Launch PyIPTV without arguments to open the playlist manager:
pyiptv
Direct Playlist Loading
Launch directly with a playlist file:
pyiptv /path/to/your/playlist.m3u
Command Line Arguments
| Command | Description |
|---|---|
pyiptv |
Launch with playlist manager |
pyiptv <playlist_path> |
Launch directly with specified playlist |
๐ Requirements
| Component | Version | Description |
|---|---|---|
| Python | 3.8+ | Core runtime |
| PySide6 | 6.5.0+ | Qt6 bindings |
| Qt6 multimedia libraries | Latest | Media playback |
| Operating System | Linux, Windows, macOS | Cross-platform support |
System Dependencies
๐ง Linux (Ubuntu/Debian)
sudo apt install python3-pip qt6-multimedia-dev
๐ฉ Linux (Fedora/CentOS)
sudo dnf install python3-pip qt6-qtmultimedia-devel
๐ macOS
brew install python qt6
๐ช Windows
No additional system dependencies required - PySide6 includes all necessary Qt libraries.
โ๏ธ Configuration
PyIPTV automatically creates configuration files in platform-appropriate locations:
| Platform | Configuration Path |
|---|---|
| Linux | ~/.config/PyIPTV/pyiptv_settings.json |
| Windows | %APPDATA%/PyIPTV/pyiptv_settings.json |
| macOS | ~/.config/PyIPTV/pyiptv_settings.json |
Available Settings
- Theme Mode - System auto-detection, light, or dark themes
- Buffering - Adjustable buffering time for smooth playback
- Performance - Options for handling large playlists
- UI Preferences - Window geometry, splitter sizes, and more
๐ Playlist Format
PyIPTV supports standard M3U playlist format with extended information:
#EXTM3U
#EXTINF:-1 tvg-id="channel1" tvg-name="Channel Name" tvg-logo="logo.png" group-title="Category",Channel Display Name
http://example.com/stream1.m3u8
#EXTINF:-1 tvg-id="channel2" tvg-name="Another Channel" group-title="Movies",Movie Channel
http://example.com/stream2.m3u8
๐ก Xtream Codes Sources
PyIPTV talks to Xtream-panel providers natively โ no need to hand-build an M3U URL.
Adding a source
- Open the Playlist Manager (
Ctrl+Por the initial launch window). - Click Add Playlist and pick Xtream Codes.
- Enter:
- Server โ
http://host:port(orhttps://) - Username
- Password
- Server โ
- Save. The dialog authenticates against
player_api.phpbefore committing, so invalid credentials are rejected up front.
How it works
| Piece | Detail |
|---|---|
| API | player_api.php โ get_live_categories, get_live_streams, get_short_epg |
| Stream URLs | Constructed client-side as {server}/live/{user}/{pass}/{stream_id}.{ext} |
| Cache | Transformed channel list is pickled under ~/.config/PyIPTV/playlist_cache/xtream_<hash>.pkl with a 6-hour TTL โ second open is instant and survives brief network outages (falls back to the stale cache on fetch failure) |
| Refresh | Right-click the playlist in the manager โ Refresh Xtream Source to invalidate the cache and re-fetch |
Scope & limitations
- Live TV only โ VOD and series are not yet surfaced (planned).
- EPG โ
get_short_epgis wired up and cached in memory, but no guide UI is shown yet (planned). - Credential storage โ username and password are stored in plaintext in
~/.config/PyIPTV/playlists.json, matching the existing settings-file pattern. If that's a concern for your environment, use a dedicated account with lowmax_connectionsand a unique password. - CDN user-agent โ Qt's media backend sends its own UA when fetching stream URLs. Some Cloudflare-fronted providers reject non-browser UAs. API calls are unaffected (the client sends a browser UA), but if playback fails with resource/network errors on every channel, the provider is likely UA-gating streams and a local proxy would be required (not implemented yet).
๐๏ธ Architecture
PyIPTV follows a modular architecture design:
โโโโโโโโโโโโโโโโโโโ
โ Main Applicationโ
โโโโโโโโโโโโโโโโโโโค
โ UI Components โ
โ Playlist Managerโ
โ Media Player โ
โ Settings Managerโ
โ Theme Manager โ
โโโโโโโโโโโโโโโโโโโ
Components
- Main Application - Entry point and application lifecycle management
- UI Components - Modular Qt widgets for different functionality
- Playlist Manager - M3U parsing and playlist management
- Media Player - Qt6 multimedia integration
- Settings Manager - Configuration persistence
- Theme Manager - System-aware theming
๐ ๏ธ Development
Setting up Development Environment
git clone https://github.com/dmarkey/PyIPTV.git
cd PyIPTV
pip install -e ".[dev]"
Running Tests
pytest
Code Formatting
black pyiptv/
isort pyiptv/
Linting
flake8 pyiptv/
๐ง Troubleshooting
Common Issues
| Issue | Solution |
|---|---|
| Video playback problems | Ensure Qt6 multimedia libraries are installed |
| Theme not applying correctly | Check desktop environment compatibility |
| Performance issues with large playlists | Adjust performance settings in configuration |
Debug Mode
Run with debug information:
PYTHONPATH=. python -m pyiptv.main --debug
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Guidelines
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation as needed
- Ensure compatibility with supported Python versions
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Most of the codebase for PyIPTV was generated by Claude Sonnet 4
- Built with PySide6 - Qt for Python
- Inspired by the need for a modern, cross-platform IPTV player
- Thanks to the open-source community for tools and libraries
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: david@dmarkey.com
โ ๏ธ Legal Notice
This software is for personal use with legally obtained IPTV content. Users are responsible for ensuring they have appropriate rights to access any content streams.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyiptv-1.1.0.tar.gz.
File metadata
- Download URL: pyiptv-1.1.0.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4315d168a0bb9b9414874e580105072fadffd334334e05dd82046ac257d297c
|
|
| MD5 |
3b9d8462f9c15a6ba681d316076e2344
|
|
| BLAKE2b-256 |
f5489a2d47e11d5c0fd8fe82c9a1f001ef5234bf72543c28571ca2d64fdf706e
|
Provenance
The following attestation bundles were made for pyiptv-1.1.0.tar.gz:
Publisher:
publish.yml on dmarkey/PyIPTV
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyiptv-1.1.0.tar.gz -
Subject digest:
f4315d168a0bb9b9414874e580105072fadffd334334e05dd82046ac257d297c - Sigstore transparency entry: 1340774656
- Sigstore integration time:
-
Permalink:
dmarkey/PyIPTV@abe9a30bd1d3bddcfd3bf79b31b8cdd91ea55fba -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dmarkey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abe9a30bd1d3bddcfd3bf79b31b8cdd91ea55fba -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyiptv-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pyiptv-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8622f2312cc0ef5d73d8811c8c3a9e433474a1ec077e6b74b51d9a753a8867
|
|
| MD5 |
f57448214231d647ce848c5c595a22b2
|
|
| BLAKE2b-256 |
5bc17c0c186fa66fad483d6b81125166cf81402e9ac9a55c764b9ddaf8e12377
|
Provenance
The following attestation bundles were made for pyiptv-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on dmarkey/PyIPTV
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyiptv-1.1.0-py3-none-any.whl -
Subject digest:
6c8622f2312cc0ef5d73d8811c8c3a9e433474a1ec077e6b74b51d9a753a8867 - Sigstore transparency entry: 1340774658
- Sigstore integration time:
-
Permalink:
dmarkey/PyIPTV@abe9a30bd1d3bddcfd3bf79b31b8cdd91ea55fba -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dmarkey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abe9a30bd1d3bddcfd3bf79b31b8cdd91ea55fba -
Trigger Event:
release
-
Statement type: