All Projects → hmlendea → iptv-playlist-aggregator

hmlendea / iptv-playlist-aggregator

Licence: GPL-3.0 license
Aggregator for IPTV playlists from multiple sources

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to iptv-playlist-aggregator

Tvlist Awesome M3u M3u8
直播源相关资源汇总 📺 💯 IPTV、M3U —— 勤洗手、戴口罩,祝愿所有人百毒不侵
Stars: ✭ 5,304 (+15054.29%)
Mutual labels:  m3u8, iptv, m3u, iptv-playlist
YouTube to m3u
Grab .m3u8 from YouTube live channels and makes .m3u IPTV Playlist from various languages and Events. Tamil / Malayalam / English / Hindi / French / Kids / Sports / Urudu etc.
Stars: ✭ 48 (+37.14%)
Mutual labels:  m3u8, iptv, m3u
iptv-proxy
Reverse proxy on iptv m3u and m3u8 file and xtream codes client api
Stars: ✭ 235 (+571.43%)
Mutual labels:  m3u8, iptv, m3u
YouTube to m3u
Grabs m3u from YouTube live.
Stars: ✭ 95 (+171.43%)
Mutual labels:  m3u8, iptv, m3u
IPtv
A collection of private IPtv list as well as Third-party IPtv list. (not updated anymore)
Stars: ✭ 16 (-54.29%)
Mutual labels:  m3u8, iptv, m3u
ustvgo to m3u
Grabs m3u links from ustvgo.tv
Stars: ✭ 35 (+0%)
Mutual labels:  m3u8, iptv, m3u
iptvtools
A set of scripts that help to better IPTV experience.
Stars: ✭ 103 (+194.29%)
Mutual labels:  iptv, m3u, iptv-playlist
useetv-playlist
No description or website provided.
Stars: ✭ 41 (+17.14%)
Mutual labels:  m3u8, iptv, m3u
Android P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 70 (+100%)
Mutual labels:  m3u8, iptv
Iptv
Collection of publicly available IPTV channels from all over the world
Stars: ✭ 45,053 (+128622.86%)
Mutual labels:  iptv, m3u
Freeiptv
FreeIPTV • Watch Free IPTV World Wide
Stars: ✭ 68 (+94.29%)
Mutual labels:  m3u8, iptv
Iptv
Lista para IPTV abierto y colaborativo
Stars: ✭ 139 (+297.14%)
Mutual labels:  m3u8, iptv
Iptv M3u Maker
IPTV 国内+国外 电视台直播源m3u文件, 收集&汇总&本地源脚本
Stars: ✭ 1,979 (+5554.29%)
Mutual labels:  iptv, m3u
iptv-list
List of IPTV channels with the option to play them directly in the browser. 📺
Stars: ✭ 87 (+148.57%)
Mutual labels:  iptv, iptv-playlist
m3u8
m3u8 file downloader library and chrome & firefox extensions/add-on's
Stars: ✭ 67 (+91.43%)
Mutual labels:  m3u8, m3u
iptv-m3u-player
项目iptv-m3u-maker衍生项目,利用已分析出的数据进行播放的桌面端app
Stars: ✭ 73 (+108.57%)
Mutual labels:  m3u8, iptv
m3ufilter
ABANDONED - A tool that allows to filter specific items from an m3u filter designed for IPTV.
Stars: ✭ 46 (+31.43%)
Mutual labels:  m3u8, iptv
IPTV-Player
IPTV Player (Delphi, VLC)
Stars: ✭ 37 (+5.71%)
Mutual labels:  iptv, iptv-playlist
Backoffice Administration
Stars: ✭ 89 (+154.29%)
Mutual labels:  m3u8, iptv
Ziliudi
IPTV自用直播源
Stars: ✭ 537 (+1434.29%)
Mutual labels:  m3u8, iptv

Donate Build Status Latest GitHub release

About

IPTV Playlist Aggregator is a tool for downloading IPTV playlists from multiple sources and aggregating their channels into a single playlist. It will match the duplicated channels into a single one, based on their name, and will override any channel data (such as logo, TVG ID, etc) with your own custom one.

Example use case: Run as a background service on a Raspberry Pi, to periodically output the playlist to an HTTP server, from where it can be directly accessed by the IPTV application via URL.

Contributions

Feel free to fork and implement any change you consider useful, and open a pull request so that I can review it and merge into the master branch here.

Rules:

  • Make sure that anything you implement workson any OS supported by .NET Core
  • Make sure that your code is formatted correctly and it respects the basic C# coding and naming standards

Instructions

Compiling

Firstly you need to make sure you have the .NET Core SDK installed and up to date.

Chose one of the following methods based on which system you want this service to be running on, and run the command inside of the source directory (where the .csproj is)

For the current system:

dotnet publish -c Release

The output will be located in ./bin/Release/net5.0

For a different system:

dotnet publish -c Release -r [RID]

For a list of all possible RID values, check out the official documentation.

The output will be located in `./bin/Release/net5.0/[RID]/'.

If the target system will have the .NET Core Runtime installed, delete or ignore the ./bin/Release/net5.0/[RID]/publish directory. If not, use only the publish directory, since that one contains all the necessary libraries that the runtime would normally provide.

Running in background as a service

Note: The following instructions only apply for Linux distributions using systemd.

Create the following service file: /lib/systemd/system/iptv-playlist-aggregator.service

[Unit]
Description=IPTV Playlist Aggregator

[Service]
WorkingDirectory=[ABSOLUTE_PATH_TO_SERVICE_DIRECTORY]
ExecStart=[ABSOLUTE_PATH_TO_SERVICE_DIRECTORY]/IptvPlaylistAggregator
User=[YOUR_USERNAME]

[Install]
WantedBy=multi-user.target

Create the following timer file: /lib/systemd/system/iptv-playlist-aggregator.timer

[Unit]
Description=Periodically aggregates an IPTV M3U playlist

[Timer]
OnBootSec=5min
OnUnitActiveSec=50min

[Install]
WantedBy=timers.target

Values that you might want to change:

  • OnBootSec: the delay before the service is started after the OS is booted
  • OnUnitActiveSec: how often the service will be triggered

In the above example, the service will start 5 minutes after boot, and then again once every 50 minutes.

Configuration

Settings

The settings are stored in the appsettings.json file in the root directory.

  • channelStorePath: The file where all your channel data is stored
  • groupStorePath: The file where all your group data is stored
  • playlistProviderStorePath: The file where all the playlist provider URLs are stored
  • outputPlaylistPath: The location where the output playlist will be written. Can be used to write directly to an http server
  • cacheDirectoryPath: The directory where all the cache files will be written. Leave as default unless you specifically require to move it
  • daysToCheck: How far in the past to go for each playlist. If today's playlist is not found (sometimes the providers skip some days) then the service will move on to the previous day, again and again until one is found or the daysToCheck limit is reached.
  • canIncludeUnmatchedChannels: Boolean value indicating whether provider channels that were not able to be matched with the data in the channelStorePath file should be included in the output file (in the Unknown category) or not at all
  • areTvGuideTagsEnabled: Boolean value indicating whether TV Guide tags (logo URLs, groups, TVG IDs, channel numbers, etc) should be included in the output file or not
  • arePlaylistDetailsTagsEnabled: Boolean value indicating whether playlist details (playlist ID, the playlist's original channel name) should be included in the output file or not
  • userAgent: String value indicating the UserAgent that should be used when performing HTTP operations

Channel data

The channel data file is an XML file, whose name and location is configred in appsetting.json by the channelStorePath value.

The file needs to be .NET serializable as an array of ChannelDefinitionEntity objects.

ChannelDefinitionEntity fields:

  • Id (string): The TVG ID. If using a TVG provider within your IPTV application, make sure the channel IDs match the TVG IDs of your provider.
  • IsEnabled (bool): Indicates whether the final playlist will contain this channel or not. Even if enabled, if the group is disabled, the channel will still be omitted.
  • Name (string): The name of the channel, as displayed in your IPTV application.
  • Country (string): (Optional) The country where the channel is being broadcasted. The tvg-country property will be populated with this value, if it exists. It will also be used uin the channel matching process.
  • GroupId (string): The ID of the group that this channel will be part of.
  • LogoUrl (string): The URL to a logo for the channel. Make sure your IPTV application supports the logo format you provide here.
  • Aliases (string collection): Different variants of the name of the channel, as it can appear in the provider playlists. This is the criteria used to match provider channels to this definition.

Group data

The group data file is an XML file, whose name and location is configred in appsetting.json by the groupStorePath value.

The file needs to be .NET serializable as an array of GroupEntity objects.

GroupEntity fields:

  • Id (string): Used for matching channels to this group
  • IsEnabled (bool): Indicates whether the final playlist will contain channels in this group or not
  • Priority (int): The order of the group, starting from 1. The lowest value means that the group will appear first in your IPTV application. The playlist will also have its channels sorted based on their group's priority
  • Name (string): The name of the group, as displayed in your IPTV application.

Providers data

The providers data file is an XML file, whose name and location is configred in appsetting.json by the playlistProviderStorePath value.

The file needs to be .NET serializable as an array of PlaylistProviderDefinitionEntity objects.

PlaylistProviderDefinitionEntity fields:

  • Id (string): The ID of the provider. You can put anything here, used only to distinguish between them.
  • IsEnabled (bool): Indicates whether this provider will be used or not.
  • Priority (int): The lower the value, the sooner the provider will be processed. Try to make sure the most reliable providers are processed first, as once a channel is matched with a provider, it will be ignored for all other providers after it.
  • AllowCaching (bool): (Optional) Indicates whether this provider's playlist should be cached or not. Useful when the provider updates the playlist multiple times a day. By default it's true.
  • UrlFormat (string): The URL to the m3u playlist file of that provider. Replace the date part of the URL with a timestamp format. For example, 2019-05-19 will be replaced with {0:yyyy-MM-dd}. The 0 is the calendar day that is processed (today, or one of the previous ones depending on the daysToCheck setting)
  • Country (string): (Optional) If set, the country will be used in the channel matching process.
  • ChannelNameOverride (string): (Optional) The channel name override for all the channels in the provider's playlist.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].