iptv-tool is a free, open source media & streaming project written in PHP and released under GPL-2.0. It has 1,116 GitHub stars, 295 forks and 9 open issues, and was last pushed 1 months ago. On this registry it ranks #23 of 27 tracked projects in Media & Streaming, with 5 head-to-head comparisons available. It gained 1 stars over the last 3 tracked days.

What is iptv-tool?

What it is

iptv-tool is a self-hosted IPTV toolbox written in PHP and distributed under the GPL-2.0 licence. It runs from a Docker image (taksss/php-epg) built on Alpine, with images published for the amd64, arm64 and armv7 architectures and a compressed image size of about 20 MB. The project manages Electronic Program Guide data, live source lists and channel logos from a single web administration page, and it returns data in the DIYP/Baichuan, 超级直播 and xmltv formats.

It lives in the IPTV and media streaming ecosystem, and the concrete problem it solves is EPG and channel-list assembly. IPTV players expect programme guide data in a specific format at a specific URL, while the sources for that data are scattered, inconsistently named and often delivered as raw XMLTV or M3U/TXT files. iptv-tool aggregates those sources, matches channel names, attaches logos, and exposes the result on stable HTTP endpoints that DIYP, TiviMate and similar players can consume. It also generates xmltv files matched to an M3U playlist, covering a workflow that would otherwise require separate scripts.

Key capabilities

  • Returns EPG data in three output formats: DIYP/Baichuan, 超级直播 and xmltv, on separate endpoints such as index.php, index.php?ch=CCTV1 and index.php?channel=CCTV1.
  • Aggregates TXT and M3U live sources, with speed testing and validation plus a live source proxy.
  • Matches channel logos by fuzzy matching and serves a tvbox-compatible logo interface.
  • Supports channel name matching for Traditional Chinese, fuzzy matching, channel aliases and regular expressions, including built-in regex patterns such as CCTV$1.
  • Stores data in SQLite or MySQL, with the phpLiteAdmin tool built in for database management.
  • Controls access through TOKEN authentication, User-Agent filtering and IP blacklists and whitelists.
  • Caches with Memcached and supports Redis, and runs scheduled tasks that refresh data on a timer.

Who uses it and how

  • Home IPTV users point DIYP, TiviMate or another player at the xmltv endpoint http://{server}:5678/index.php to supply a programme guide.
  • tvbox users wire the guide and logo endpoints into their configuration through the epg and logo fields with {name} and {date} placeholders.
  • Operators aggregate several TXT or M3U playlists, run speed checks and proxy the surviving streams through one managed list.
  • Administrators schedule refresh jobs, typically starting around 01:00 and repeating every 6 to 12 hours, because many sources return no data between 00:00
project readme (upstream, from github) — read inline

📺 IPTV工具箱

IPTV Tool | Trendshift

GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests License Docker Pulls Image Size

IPTV 工具箱, Docker 部署,支持 EPG 管理直播源管理台标管理,兼容 DIYP/百川超级直播以及 xmltv 格式。

[!TIP] ⚠️ 使用前请仔细阅读「管理页面」底部的「使用说明」

原贴:【IPTV工具箱】EPG节目单管理、直播源管理、台标管理

xmltv 用户使用方法:【一键生成】匹配 M3U 文件的 XML 节目单

直播源管理 使用方法:【IPTV工具箱】直播源管理使用说明

自定数据源 使用方法:【IPTV工具箱】自定义数据源(timetv、51livetv、diyp)

💻 主要功能

📡 多格式:支持返回 DIYP/百川、超级直播以及 xmltv 格式文件。

🐳 多架构:提供 amd64、arm64 和 armv7 架构的 Docker 镜像。

📦 小体积镜像:基于 Alpine 构建,压缩后仅 20 MB。

🗃️ 数据库管理:支持 SQLite 和 MySQL 数据库,内置 phpLiteAdmin 管理工具。

🖼️ 台标管理:支持台标模糊匹配,支持 tvbox 接口。

直播源管理:支持聚合 TXT/M3U 直播源、测速校验、直播源代理。

🔒 访问权限控制:支持设置 TOKEN 、User-Agent、IP 黑白名单。

⏱️ 缓存支持:集成 Memcached,支持 Redis。

🔄 频道匹配:支持繁体中文频道匹配、模糊匹配;支持频道别名、正则表达式。

定时任务:支持定时更新数据。

📝 节目单生成:支持生成指定频道节目单并匹配 M3U 的 xmltv 格式文件。

🗂️ 兼容多种格式:支持不同标准格式的 XMLTV 文件,支持自定义数据源。

🛠️ 文件管理:集成 tinyfilemanager 文件管理器。

🌐 界面设置:包含简单易用的网页设置页面,便于操作和管理。

内置正则表达式说明:

  • 包含 regex:
  • 示例:
    • CCTV$1 => regex:/^CCTV[-\s]*(\d{1,2}(\s*P(LUS)?|[K\+])?)(?![\s-]*(美洲|欧洲)).*/i :将 CCTV 1综合CCTV-4K频道CCTV - 5+频道CCTV - 5PLUS频道 等替换成 CCTV1CCTV4KCCTV5+CCTV5PLUS(排除 CCTV4美洲CCTV4欧洲

📝 更新日志

CHANGELOG.md

🚀 部署步骤

部署/管理脚本(推荐)

bash <(curl -Ls https://raw.githubusercontent.com/taksssss/iptv-tool/master/install.sh)

或者

bash <(curl -Ls https://gitee.com/taksssss/iptv-tool/raw/main/install.sh)

或者

bash <(curl -Ls https://gcore.jsdelivr.net/gh/taksssss/iptv-tool@master/install.sh)

手动部署

docker run -d --name php-epg \
  -p 5678:80 \
  -v $HOME/epg:/htdocs/data \
  -e PHP_MEMORY_LIMIT=512M \
  -e ENABLE_FFMPEG=false \
  --restart unless-stopped \
  taksss/php-epg:latest

$HOME/epg:默认数据目录,根据需要自行修改
5678:默认端口,根据需要自行修改(注意端口占用)
-e PHP_MEMORY_LIMIT=512M:PHP 内存限制,默认 512M
-e ENABLE_FFMPEG=true:启用 ffmpeg 组件
无法正常拉取镜像的,可将 taksss/php-epg:latest 替换为 ccr.ccs.tencentyun.com/taksss/php-epg:latest

HTTPS 相关:
-p 5679:443:映射 HTTPS 端口
-e ENABLE_HTTPS=true:启用 HTTPS
-e FORCE_HTTPS=true:强制跳转到 HTTPS
-v /path/to/server.crt:/etc/ssl/certs/server.crt:挂载证书文件
-v /path/to/server.key:/etc/ssl/private/server.key:挂载私钥文件

手动升级

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower php-epg --cleanup --run-once

🛠️ 使用步骤

  1. 在浏览器中打开 http://{服务器IP地址}:5678/manage.php

  2. 默认密码为空,根据需要自行设置

  3. 添加 EPG 地址, GitHub 源确保能够访问,点击 保存配置 保存

  4. 点击 更新数据 拉取数据,点击 更新日志 查看日志,点击 频道管理 查看具体条目

  5. 设置 定时任务 ,点击 保存配置 保存,点击 定时日志 查看定时任务时间表

    建议从 凌晨1点 左右开始抓,很多源 00:00 ~ 00:30 都是无数据。 隔 6 ~ 12 小时抓一次即可。

  6. 点击 更多设置,选择是否 生成xml文件xml内容,设置匹配频道列表

  7. 测试各个接口的返回结果是否正确:

  • xmltv 接口:http://{服务器IP地址}:5678/index.php
  • DIYP/百川 接口:http://{服务器IP地址}:5678/index.php?ch=CCTV1
  • 超级直播 接口:http://{服务器IP地址}:5678/index.php?channel=CCTV1
  • tvbox 接口:
    • "epg":"http://{服务器IP地址}:5678/index.php?ch={name}&date={date}"
    • "logo":"http://{服务器IP地址}:5678/index.php?ch={name}&type=icon"
  1. http://{服务器IP地址}:5678/index.php 填入 DIYPTiviMate 等软件的 EPG 地址栏
  • ⚠️ 直接使用 docker run 运行的话,可以将 :5678/index.php 替换为 :5678/
  • ⚠️ 部分软件不支持跳转解析 xmltv 文件,可直接使用 :5678/t.xml.gz:5678/t.xml 访问。

快捷键:

  • Ctrl + S:保存设置
  • Ctrl + /:对选中 EPG 地址设置(取消)注释

☕ Buy Me a Coffee

查看打赏列表

⭐ Star History

Star History Chart

👍 特别鸣谢

Frequently asked questions

Is iptv-tool free to use?

iptv-tool is open source under the GPL-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does iptv-tool do?

IPTV工具箱, Docker🐳部署,支持EPG管理、直播源管理、台标管理,兼容DIYP/百川、超级直播及xmltv格式。

What is iptv-tool written in?

iptv-tool is primarily written in PHP. Its source is publicly available at https://github.com/taksssss/iptv-tool, and it has 1,116 GitHub stars.