Skip to content

A set of tools for working with IPTV services: Playlists, EPG, UDPXY

License

Notifications You must be signed in to change notification settings

Losenmann/iptv-toolkit

Repository files navigation

IPTV Toolkit

Golang Docker Kubernetes Maintainer GitHub License Docker Image Version

Overview

The service allows you to convert iptv and epg playlists. For playlists, conversion is carried out in the following formats: m3u, m3u8, xml. EPG conversion is carried out in the following formats: jtv, xml, xml.gz.
The service supports automatic detection of the EPG type and playlists.
Also, there is support for creating a playlist with a built-in udpxy link: from udp://@238.0.0.0:1234 to http://udpxy.local:4022/udp/238.0.0.0:1234 There is support for integrating links to EPG into the playlist file.
Also in the background, the udpxy proxy server is launched, allowing you to convert Multicast traffic to HLS. Along with this, a simple file service is launched to download playlists and EPG.

Note

Server file access endpoint: "/files/". For UDPXY: "/udp/" and "/status/".

Supported tools

Quick start

  • Docker Compose

    docker-compose up -d -f ./docker-compose.yaml
  • Kubernetes

    kubectl apply -n media -f https://raw.githubusercontent.com/Losenmann/iptv-toolkit/refs/heads/master/deploy/kubernetes.yaml

Important

For Docker, need to edit the .env file in place next to docker-compose.
For Kubernetes, need to edit and apply the ConfigMap before deployment. Also edit the Ingress resource host, for example, via kubectl edit.

Environment Variables and CLI Key

Environmental variables and key CLI applicable in all operating modes.

Variables Key Default Description
IPTVTOOLKIT_EPG -e none Link to tv guide
IPTVTOOLKIT_EPG_DST -E ./files/tvguide Path of export of EPGs
IPTVTOOLKIT_PLAYLIST -p none Link to channels playlist
IPTVTOOLKIT_PLAYLIST_DST -P ./files/playlist Path of export of Playlists
IPTVTOOLKIT_PLAYLIST_UDPXY -u none Create a playlist with a formatted
udp link in udpxy format
IPTVTOOLKIT_PLAYLIST_EMBED_EPG -i none Link to epg integrated into playlist
IPTVTOOLKIT_WEB_PATH -f ./files Path to display files by web server
IPTVTOOLKIT_WEB_PORT -P 4023 Web server port
IPTVTOOLKIT_CRONTAB -c 30 6 * * * Сrontab style task schedule
none -S false Start Schedule job
none -U false Start UDPXY proxy
none -W false Start Web Server

Important

Environment variables repeat CLI.
CLI key take precedence over environment variables.

Build from source

Build executable file from source

There are two ways to build: with Docker or locally.
In Docker, everything you need is built into a container and then placed in the ./build directory.
Or you can build locally. The executables will also be located in the ./build directory.
Docker build is done and installed by default.

Important

Before building locally, you need to install the Golang environment and install the upx packager before building.

Build using Docker

  1. Go to the project directory
  2. Run make build command
  3. Check catalog ./build

Build local

  1. Go to the project directory
  2. Run make build-local command
  3. Check catalog ./build

Note

You can pass the ARCH_ALL=true argument to the make build-local command for cross-compilation executable files.
Example: make build-local ARCH_ALL=true

Build Docker Image

Build Docker Image Allows you to build a ready-to-deploy Docker image from sources.

  1. Go to the project directory
  2. Run make docker command
  3. Check the repository docker image ls

Once the image build is complete, you can deploy it by running the command: make docker-up or make docker-down