From iptvx
Jump to: navigation, search

This page covers the configuration and setup of channels for iptvx. All these channels and their configuration is held in the channels.conf file as described on the Configuration page. A simple file with only one channel would look like the following.

channels = ({
      default = true,
      name = "My Channel",
      url = "http://myprovider.tld/mychannel.m3u8",
      logoFile = "mychannel.svg",
      epgUrl = "http://myprovider.tld/xmltv/mychannel_%Y-%m-%d.xml"

All channels are sorted the way they are sorted within this channels.conf file. Based on libconfig, it follows the pattern channels = ({channel1},{channel2},{channel3}); and in your own interest you should keep it clean and readable. A more complex channel can also look like the following example.

channels = ({
      default = true,
      name = "My Complicated Channel",
      urlShell = "getchannel mycomplicatedchannel",
      logoFile = "mycomplicatedchannel.svg",
      epgShell = "getxmltv mycomplicatedchannel",
      epgFile = "mycomplicatedchannel_%Y-%m-%d.xml"

The above channel uses shell scripts to retrieve the channel url and the epg data. This was implemented to support more complex streaming or data sources that the basic implementation of iptvx might not support. For this channel iptvx will execute the shell command in _urlShell_ and expects that to output the streaming URL to STDOUT. The same applies to epgShell where that script or application is expected to output all XMLTV-compliant XML-data to STDOUT which is then sotred in the file defined in epgFile within the epg subdirectory of the data directory.

Channel configuration

As seen above, there are a number of ways to configure a channel. The basic and simplest version is to define the URL of the streaming video/ audio source and the URL of the XMLTV file for the EPG. In this section you will find an explanation of all possible configuration settings and when to use or avoid them.


A simple boolean (true or false) value that indicates whether this is channel iptvx shall show upon start. It is practically the default channel.

default = true


The visual name of the channel to be used in the user interface, the channel list and any other situation to identify the channel itself. It can be any value, but certain characters might cause trouble.

name = "My Channel"


Defines the URL where to the logo of the channel can be found at. The logo will be downloaded from that URL and stored in the local file defined by logoFile if present. If not, it will use the filename defined by the URL.

logoUrl = ""


Filename of the image file that represents the channel logo and can be found in the data directory within the logo subdirectory. Any images that can be displayed by a WebKit-browser are ok, but it is highly recommended to use SVG vector images or at least PNG images for better quality. Non-SVG images that are too large can dramatically impact the overall performance of the application as it needs to constantly render the images.

logoFile = "mychannel.svg"


Defines the URL of the video/audio stream that represents the channel. It is a simple text value that is passed to the underlying VLC library to play the stream. The decision was made for LibVLC not just because it is easy to implement and provides great support, but also because it supports a massive amount of streaming services, codecs and formats. If VLC on your system plays your streaming URL, then it is almost certain that iptvx will do as well. The intended use of iptvx is primarily HTTP, but it is flexbile to support any URL that VLC accepts.

url = "http://myprovider.tld/mychannel.ts"


Is the same as _url_ with the exception that its value is supposed to be a shell script or application that returns the streaming URL as output on STDOUT. The executed script needs to terminate in order for iptvx to continue and finish reading the STDOUT output. No other output and no new-line output shall be returned by this script. In the below example the script getchannel is called and gets the parameter mychannel passed. Technically iptvx uses popen, fgets and pclose to execute, read STDOUT and close the process when finished. The urlShell setting is only used by iptvx when the url value of the channel is not present, otherwise when url is present the setting urlShell will be ignored.

urlShell = "getchannel mychannel"


Defines the URL of the EPG file to download. The file represented by the URL needs to be a valid XMLTV file with the epg information for this channel. It can also be a combined XMLTV file, but then the channel id needs to be specified with the epgChannelId setting.

epgUrl = ""

The epgUrl setting can take date variables to load files with dynamic file names. It uses strftime to format the string provided in the setting. The setting epgInterval defines on how often EPG files are loaded.

epgUrl = ""


Alternatively to epgUrl you can define a shell command to execute in order to retrieve the XMLTV epg data. The application will ignore epgUrl and execute the shell command, read it's STDOUT output and use that output as XMLTV data for the channel.

epgShell = "getxmltv mychannel"

This setting is especially helpful if you are using non-XMLTV data sources and a script or other application that transforms these data sources.


This setting defines the filename where the EPG XMLTV data is supposed to be stored in on the local disk. The filename will be created in the data directory under the epg directory. This is the cached file that will be held until it's contents expired. If the file is not defined, the application will use the filename as defined in the URL.

epgFile = "mychannel.xml"


This specifies the channel id of the channel as used in the XMLTV epg data. If this setting is not specified, the application will consider all the contents in the defined XMLTV data to belong to the channel. If you have an XMLTV file that contains only a single channel, this setting can be left empty. If however you use XMLTV sources that contain multiple channels, this setting helps you set the correct channel id within the XMLTV data.

epgChannelId = "BBC London HD"


This setting defines how often a file is being loaded. There are currently the only options daily and anything else. If set to daily it will change the string provided in epgUrl using strftime for each day and load the file from the URL until it hits the value defined in epg_hours within the Configuration.

epgInterval = "daily"

Let's look at an example: say you have files named like channel_2019-11-25.xml for each day. Now you want to load the file for the next 3 days. You have set epg_hours to 72 in order to define loading the next 3 days. You set epgInterval to daily and define the channel's URL as channel_%Y_%m_%d.xml and the application will automatically adjust the filenames.