Skip to main content

A modern IPTV player built with PySide6

Project description

PyIPTV Logo

PyIPTV

A Modern Python IPTV Player

Python 3.8+ License: MIT PySide6 Maintenance

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

  1. Open the Playlist Manager (Ctrl+P or the initial launch window).
  2. Click Add Playlist and pick Xtream Codes.
  3. Enter:
    • Server โ€” http://host:port (or https://)
    • Username
    • Password
  4. Save. The dialog authenticates against player_api.php before 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_epg is 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 low max_connections and 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


โš ๏ธ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyiptv-1.1.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyiptv-1.1.0-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

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

Hashes for pyiptv-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f4315d168a0bb9b9414874e580105072fadffd334334e05dd82046ac257d297c
MD5 3b9d8462f9c15a6ba681d316076e2344
BLAKE2b-256 f5489a2d47e11d5c0fd8fe82c9a1f001ef5234bf72543c28571ca2d64fdf706e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyiptv-1.1.0.tar.gz:

Publisher: publish.yml on dmarkey/PyIPTV

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyiptv-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c8622f2312cc0ef5d73d8811c8c3a9e433474a1ec077e6b74b51d9a753a8867
MD5 f57448214231d647ce848c5c595a22b2
BLAKE2b-256 5bc17c0c186fa66fad483d6b81125166cf81402e9ac9a55c764b9ddaf8e12377

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyiptv-1.1.0-py3-none-any.whl:

Publisher: publish.yml on dmarkey/PyIPTV

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page