Convert Figma logo to code with AI

iptv-org logoepg

Utilities for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.

2,237
293
2,237
28

Top Related Projects

95,971

Collection of publicly available IPTV channels from all over the world

2,087

M3U Proxy for Plex DVR and Emby Live TV

Quick Overview

The iptv-org/epg repository is a project that provides Electronic Program Guide (EPG) data for IPTV channels. It offers a collection of EPG files in XMLTV format, covering various countries and regions worldwide. The project aims to provide up-to-date and accurate program information for IPTV users and service providers.

Pros

  • Extensive coverage of channels from multiple countries and regions
  • Regular updates to ensure accurate and current program information
  • Open-source project with community contributions
  • EPG data provided in standardized XMLTV format for easy integration

Cons

  • Dependent on external sources for data, which may affect reliability
  • Limited documentation on how to contribute or use the data effectively
  • May not cover all niche or local channels in some regions
  • Potential legal concerns regarding the collection and distribution of EPG data

Getting Started

To use the EPG data from this repository:

  1. Visit the repository: https://github.com/iptv-org/epg
  2. Navigate to the sites directory to find EPG files for specific countries or regions
  3. Download the desired EPG file(s) in XMLTV format
  4. Use the EPG data with your preferred IPTV player or service that supports XMLTV format

Note: This project is not a code library, so there are no code examples or specific installation instructions. The EPG data can be used directly with compatible IPTV software or services.

Competitor Comparisons

95,971

Collection of publicly available IPTV channels from all over the world

Pros of iptv

  • Comprehensive collection of publicly available IPTV channels
  • Well-organized playlist structure with categorization by country and content type
  • Active community contributing to channel updates and maintenance

Cons of iptv

  • Larger repository size due to extensive channel listings
  • May include some unstable or unreliable streams
  • Requires more frequent updates to maintain accuracy

Code comparison

iptv (playlist entry):

#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://i.imgur.com/rPzH88J.png" group-title="News",BBC News HD
http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8

epg (EPG entry):

<programme start="20230501000000 +0000" stop="20230501003000 +0000" channel="BBCNews.uk">
  <title lang="en">BBC News</title>
  <desc lang="en">The latest national and international news stories from the BBC News team.</desc>
  <category lang="en">News</category>
</programme>

The iptv repository focuses on providing a comprehensive list of IPTV channels, while epg concentrates on delivering electronic program guide (EPG) data for various channels. iptv offers a wider range of channels but may include less stable streams, whereas epg provides detailed programming information for a more curated selection of channels. Both repositories complement each other, with iptv supplying the channel sources and epg offering the corresponding program schedules.

2,087

M3U Proxy for Plex DVR and Emby Live TV

Pros of xTeVe

  • Provides a more comprehensive IPTV solution, including M3U playlist management and Plex/Emby integration
  • Offers a user-friendly web interface for easy configuration and management
  • Supports multiple tuner emulation for better compatibility with various media servers

Cons of xTeVe

  • More complex setup and configuration process compared to epg
  • Requires more system resources due to its broader feature set
  • May have a steeper learning curve for users new to IPTV management

Code Comparison

xTeVe (Go):

func (config *Config) LoadConfig() error {
    data, err := ioutil.ReadFile(config.FilePath)
    if err != nil {
        return err
    }
    return json.Unmarshal(data, &config)
}

epg (JavaScript):

async function fetchEPG(url) {
  const response = await fetch(url);
  const xmlText = await response.text();
  return parseXML(xmlText);
}

While both projects serve different purposes in the IPTV ecosystem, xTeVe offers a more comprehensive solution for managing IPTV services, including EPG functionality. epg, on the other hand, focuses specifically on providing and managing Electronic Program Guide data. The code snippets demonstrate the different languages and approaches used in each project, with xTeVe using Go for configuration management and epg using JavaScript for fetching and parsing EPG data.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

EPG update

Tools for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.

Table of contents

Installation

First, you need to install Node.js on your computer. You will also need to install Git to follow these instructions.

After that open the Console (or Terminal if you have macOS) and type the following command:

git clone --depth 1 -b master https://github.com/iptv-org/epg.git

Then navigate to the downloaded epg folder:

cd epg

And install all the dependencies:

npm install

Usage

To start the download of the guide, select one of the supported sites from SITES.md file and paste its name into the command below:

npm run grab --- --site=example.com

Then run it and wait for the guide to finish downloading. When finished, a new guide.xml file will appear in the current directory.

You can also customize the behavior of the script using this options:

Usage: npm run grab --- [options]

Options:
  -s, --site <name>             Name of the site to parse
  -c, --channels <path>         Path to *.channels.xml file (required if the "--site" attribute is
                                not specified)
  -o, --output <path>           Path to output file (default: "guide.xml")
  -l, --lang <codes>            Allows you to restrict downloading to channels in specified languages only (example: "en,id")
  -t, --timeout <milliseconds>  Timeout for each request in milliseconds (default: 0)
  -d, --delay <milliseconds>    Delay between request in milliseconds (default: 0)
  -x, --proxy <url>             Use the specified proxy (example: "socks5://username:password@127.0.0.1:1234")
  --days <days>                 Number of days for which the program will be loaded (defaults to the value from the site config)
  --maxConnections <number>     Number of concurrent requests (default: 1)
  --gzip                        Specifies whether or not to create a compressed version of the guide (default: false)

Parallel downloading

By default, the guide for each channel is downloaded one by one, but you can change this behavior by increasing the number of simultaneous requests using the --maxConnections attribute:

npm run grab --- --site=example.com --maxConnections=10

But be aware that under heavy load, some sites may start return an error or completely block your access.

Use custom channel list

Create an XML file and copy the descriptions of all the channels you need from the /sites into it:

<?xml version="1.0" encoding="UTF-8"?>
<channels>
  <channel site="arirang.com" lang="en" xmltv_id="ArirangTV.kr" site_id="CH_K">Arirang TV</channel>
  ...
</channels>

And then specify the path to that file via the --channels attribute:

npm run grab --- --channels=path/to/custom.channels.xml

Run on schedule

To download the guide on a schedule, you can use the included process manager. Just run it with desire cron expression and the grab options:

npx pm2 start npm --no-autorestart --cron-restart="0 0,12 * * *" -- run grab --- --site=example.com

To track the process, you can use the command:

npx pm2 logs

For more info go to pm2 documentation.

Access the guide by URL

You can make the guide available via URL by running your own server. The easiest way to do this is to run this command:

npx serve

After that, the guide will be available at the link:

http://localhost:3000/guide.xml

In addition it will be available to other devices on the same local network at the address:

http://<your_local_ip_address>:3000/guide.xml

For more info go to serve documentation.

Update

If you have downloaded the repository code according to the instructions above, then to update it will be enough to run the command:

git pull

And then update all the dependencies:

npm install

Docker

Build an image

docker build -t iptv-org/epg --no-cache .

Create and run container

docker run -p 3000:3000 -v /path/to/channels.xml:/epg/channels.xml iptv-org/epg

By default, the guide will be downloaded every day at 00:00 UTC and saved to the /epg/public/guide.xml file inside the container.

From the outside, it will be available at this link:

http://localhost:3000/guide.xml

or

http://<your_local_ip_address>:3000/guide.xml

Environment Variables

To fine-tune the execution, you can pass environment variables to the container as follows:

docker run \
-p 5000:3000 \
-v /path/to/channels.xml:/epg/channels.xml \
-e CRON_SCHEDULE="0 0,12 * * *" \
-e MAX_CONNECTIONS=10 \
-e GZIP=true \
-e PROXY="socks5://127.0.0.1:1234" \
-e DAYS=14 \
-e TIMEOUT=5 \
-e DELAY=2 \
iptv-org/epg
VariableDescription
CRON_SCHEDULEA cron expression describing the schedule of the guide loadings (default: "0 0 * * *")
MAX_CONNECTIONSLimit on the number of concurrent requests (default: 1)
GZIPBoolean value indicating whether to create a compressed version of the guide (default: false)
PROXYUse the specified proxy
DAYSNumber of days for which the guide will be loaded (defaults to the value from the site config)
TIMEOUTTimeout for each request in milliseconds (default: 0)
DELAYDelay between request in milliseconds (default: 0)

Database

All channel data is taken from the iptv-org/database repository. If you find any errors please open a new issue there.

API

The API documentation can be found in the iptv-org/api repository.

Resources

Links to other useful IPTV-related resources can be found in the iptv-org/awesome-iptv repository.

Discussions

If you have a question or an idea, you can post it in the Discussions tab.

Contribution

Please make sure to read the Contributing Guide before sending issue or a pull request.

And thank you to everyone who has already contributed!

Backers

Contributors

License

CC0