Go to file
2025-03-28 13:28:22 -03:00
locales Added channel update functionality 2025-03-28 13:21:22 -03:00
static Add favicon.ico 2025-03-11 19:30:36 -03:00
templates Added channel update functionality 2025-03-28 13:21:22 -03:00
__init__.py Changed .py files to be executable 2025-03-07 19:12:16 -03:00
.gitignore Added l10n, and cookie for that 2025-03-14 22:29:27 -03:00
channel_updater.py Added channel update functionality 2025-03-28 13:21:22 -03:00
channels.py Fixed groups/categories 2025-03-10 02:37:03 -03:00
COPYING Initial commit 2025-02-23 02:18:19 -03:00
FiraSans-Bold.ttf Initial commit 2025-02-23 02:18:19 -03:00
FiraSans-Regular.ttf Initial commit 2025-02-23 02:18:19 -03:00
localization.py I guess we doin cookies now 2025-03-15 13:57:10 -03:00
main.py Added channel update functionality 2025-03-28 13:21:22 -03:00
nosignal.png Initial commit 2025-02-23 02:18:19 -03:00
novideo.png Initial commit 2025-02-23 02:18:19 -03:00
OFL.txt Initial commit 2025-02-23 02:18:19 -03:00
osd.py Changed .py files to be executable 2025-03-07 19:12:16 -03:00
player.py Added IPMPV_AO env variable 2025-03-09 17:48:46 +00:00
qt_process.py Made volume OSD not restart every time volume is changed 2025-03-07 19:36:46 -03:00
README.md Added more env variables to README.md 2025-03-28 13:28:22 -03:00
requirements.txt Changed requirements, added Alsa to list 2025-03-07 19:15:19 -03:00
run.sh Made it so the font actually gets loaded, fixed run.sh 2025-02-24 23:30:28 -03:00
server.py Added channel update functionality 2025-03-28 13:21:22 -03:00
utils.py Added channel update functionality 2025-03-28 13:21:22 -03:00
volume_osd.py Changed .py files to be executable 2025-03-07 19:12:16 -03:00
volume.py Made volume OSD not restart every time volume is changed 2025-03-07 19:36:46 -03:00

ipmpv

Introduction

This Python script is designed to turn your Linux machine into an IPTV player, using MPV for video playback, Pygame for an OSD, and Flask as a remote controllable GUI.

It was designed with a Raspberry Pi using composite output in mind, some features may not work in all devices, but it's otherwise functional.

Setup

You must provide your own IPTV list in the form of an M3U URL. Set the IPMPV_M3U_URL variable, run the "run.sh" script in an graphical session, access http://[your-machine-ip]:5000 in a web browser, and you're ready to go!

I recommend using a Raspberry Pi 4, and transcoding the video streams to 480p, as video acceleration support does not seem to play well with this app yet.

Video is stretched to fill the screen by default. Feel free to tweak the MPV settings in the script itself, a better way to change them is Coming Soon™

Features

  • TV channel selection

  • Deinterlacing (can be slow in older Pis)

  • Low latency mode

  • Support for custom URL playback

  • Support for starting RetroArch, pairs well with the Pi for CRT retro gaming

  • Resolution switching for the Raspberry Pi's composite output

Requirements

This application will only run on Linux under an X11 session.

A Bash script is included to install the following in a virtual environment:

  • PyQT5

  • Flask

  • Regex

  • Pillow

  • Requests

  • Python-MPV

  • PyAlsaAudio

Additionally, the following applications and libraries are required to be installed in the host system:

  • Python >= 3.10

  • Alsa

  • libmpv

  • wmctl

  • (Optional) yt-dlp, for YouTube video playback

  • (RPI Specific) python3-pyqt5, it won't install via pip due to RAM constraints

Environment variables

  • IPMPV_M3U_URL: The URL of your M3U playlist. Default: None
  • IPMPV_CORNER_RADIUS: Corner radius of the OSD. Set to 0 for sharp edges. Default: 15
  • IPMPV_RETROARCH_CMD: Your custom RetroArch command, if any. Default: 'retroarch'
  • IPMPV_HWDEC: Hardware decoding device to be passed along to MPV, e.g. vaapi. Default: 'auto-safe'
  • IPMPV_AO: Audio playback API, e.g. pipewire. Note: volume control only works properly with ALSA at the moment. Default: 'alsa'
  • IPMPV_UPDATE_INTERVAL: Channel update interval in seconds. Default: 3600

Coming Soon

Short term

  • A way to change MPV settings without editing the script

  • Better support for the Pi's HDMI output, more resolution support

Long term

  • A recommended environment, perhaps in the form of a Pi .img

  • Docker image???

License

This software is licensed under the GNU General Public License v3. See COPYING.

The Fira Sans font is licensed under the SIL Open Font License. See OFL.txt. Fira is a trademark of The Mozilla Corporation.