logo
4
0
WeChat Login
logo

IPTV-API

A highly customizable IPTV interface update project 📺, with customizable channel menus, automatic live stream acquisition, speed testing, and validation to generate usable results, achieving 『✨instant playback experience🚀』

中文 | English

🎉💻 IPTV-Web: IPTV live stream management platform, supports online playback and other features, under development...

💖 Channel Alias Collection Plan

IMPORTANT

  1. The default data sources, such as subscription sources, come from open-source projects on GitHub and are for demonstration purposes only. They may have stability issues.
  2. This project does not guarantee or explain the stability of the interface results.
  3. To achieve optimal stability, it is recommended to maintain the data sources yourself.
Default Data Sources

📍Subscription sources are from:

📍Channel icons are from:

Features

  • ✅ Customizable templates, support for aliases, and generation of desired channels
  • ✅ Supports RTMP streaming (live/hls) to enhance playback experience
  • ✅ Supports multiple source acquisition methods: local source, multicast source, hotel source, subscription source, keyword search
  • ✅ Support for playback interface retrieval and generation
  • ✅ Supports EPG functionality, displaying channel preview content
  • ✅ Interface speed verification, obtain delay, speed, resolution, filter invalid interface
  • ✅ Preferences: IPv4, IPv6, interface source sorting priority and quantity configuration, whitelist, blacklist, location, and ISP filtering
  • ✅ Scheduled execution at 6:00 AM and 18:00 PM Beijing time daily
  • ✅ Supports various execution methods: workflows, command line, GUI software, Docker(amd64/arm64/arm v7)
  • ✨ For more features, see Config parameter

Latest results

IMPORTANT

The following addresses may not be stable for access within China. It is recommended to prepend a proxy address for use. You can reply with cdn in the public account to obtain it.

Live Sources

  • Default
https://raw.githubusercontent.com/Guovin/iptv-api/gd/output/result.m3u
  • IPv6
https://raw.githubusercontent.com/Guovin/iptv-api/gd/output/ipv6/result.m3u
  • IPv4
https://raw.githubusercontent.com/Guovin/iptv-api/gd/output/ipv4/result.m3u

VOD source

https://raw.githubusercontent.com/Guovin/iptv-api/gd/source.json

Config

Configuration ItemDescriptionDefault Value
open_driverEnable browser execution, If there are no updates, this mode can be enabled, which consumes more performanceFalse
open_epgEnable EPG function, support channel display preview contentTrue
open_empty_categoryEnable the No Results Channel Category, which will automatically categorize channels without results to the bottomFalse
open_filter_resolutionEnable resolution filtering, interfaces below the minimum resolution (min_resolution) will be filtered, GUI users need to manually install FFmpeg, the program will automatically call FFmpeg to obtain the interface resolution, it is recommended to enable, although it will increase the time-consuming of the speed measurement stage, but it can more effectively distinguish whether the interface can be playedTrue
open_filter_speedEnable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filteredTrue
open_hotelEnable the hotel source function, after closing it all hotel source working modes will be disabledFalse
open_hotel_foodieEnable Foodie hotel source work modeTrue
open_hotel_fofaEnable FOFA、ZoomEye hotel source work modeFalse
open_localEnable local source function, will use the data in the template file and the local source fileTrue
open_m3u_resultEnable the conversion to generate m3u file type result links, supporting the display of channel iconsTrue
open_multicastEnable the multicast source function, after disabling it all multicast sources will stop workingFalse
open_multicast_foodieEnable Foodie multicast source work modeTrue
open_multicast_fofaEnable FOFA multicast source work modeFalse
open_online_searchEnable keyword search source featureFalse
open_requestEnable query request, the data is obtained from the network (only for hotel sources and multicast sources)False
open_rtmpEnable RTMP push function, need to install FFmpeg, use local bandwidth to improve the interface playback experienceFalse
open_serviceEnable page service, used to control whether to start the result page service; if deployed on platforms like Qinglong with dedicated scheduled tasks, the function can be turned off after updates are completed and the task is stoppedTrue
open_speed_testEnable speed test functionality to obtain response time, rate, and resolutionTrue
open_subscribeEnable subscription source featureTrue
open_supplyEnable compensation mechanism mode, used to control when the number of channel interfaces is insufficient, automatically add interfaces that do not meet the conditions (such as lower than the minimum rate) but may be available to the result, thereby avoiding the result being emptyTrue
open_updateEnable updates, if disabled then only the result page service is runTrue
open_update_timeEnable show update timeTrue
open_url_infoEnable to display interface description information, used to control whether to display interface source, resolution, protocol type and other information, the content after the $ symbol, the playback software uses this information to describe the interface, if some players (such as PotPlayer) do not support parsing and cannot play, you can turn it offFalse
open_use_cacheEnable the use of local cache data, applicable to the query request failure scenario (only for hotel sources and multicast sources)True
open_historyEnable the use of historical update results (including the interface for template and result files) and merge them into the current updateTrue
open_headersEnable to use the request header verification information contained in M3U, used for speed measurement and other operations. Note: Only a few players support playing this type of interface with verification information, which is turned off by defaultFalse
app_portPage service port, used to control the port number of the page service8000
cdn_urlCDN proxy acceleration address, used for accelerated access to subscription sources, channel icons and other resources
final_fileGenerated result file pathoutput/result.txt
hotel_numThe number of preferred hotel source interfaces in the results10
hotel_page_numNumber of pages to retrieve for hotel regions1
hotel_region_listList of hotel source regions, 'all' indicates all regionsall
ispInterface operator, used to control the result to only include the filled operator type, supports keyword filtering, separated by English commas, not filled in means no operator specified
ipv4_numThe preferred number of IPv4 interfaces in the result5
ipv6_numThe preferred number of IPv6 interfaces in the result5
ipv6_supportIt is forced to consider that the current network supports IPv6 and skip the checkFalse
ipv_typeThe protocol type of interface in the generated result, optional values: ipv4, ipv6, allall
ipv_type_preferInterface protocol type preference, prioritize interfaces of this type in the results, optional values: ipv4, ipv6, autoipv6,ipv4
locationInterface location, used to control the result to only include the filled location type, supports keyword filtering, separated by English commas, not filled in means no location specified, it is recommended to use the location close to the user, which can improve the playback experience
local_fileLocal source file pathconfig/local.txt
local_numPreferred number of local source interfaces in the result10
min_resolutionMinimum interface resolution, requires enabling open_filter_resolution to take effect1920x1080
max_resolutionMaximum interface resolution, requires enabling open_filter_resolution to take effect1920x1080
min_speedMinimum interface speed (M/s), requires enabling open_filter_speed to take effect0.5
multicast_numThe number of preferred multicast source interfaces in the results10
multicast_page_numNumber of pages to retrieve for multicast regions1
multicast_region_listMulticast source region list, 'all' indicates all regionsall
online_search_numThe number of preferred keyword search interfaces in the results0
online_search_page_numPage retrieval quantity for keyword search channels1
origin_type_preferPreferred interface source of the result, the result is sorted according to this order, separated by commas, for example: local, hotel, multicast, subscribe, online_search; local: local source, hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate
recent_daysRetrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues30
request_timeoutQuery request timeout duration, in seconds (s), used to control the timeout and retry duration for querying interface text links. Adjusting this value can optimize update time.10
speed_test_limitNumber of interfaces to be tested at the same time, used to control the concurrency during the speed measurement stage, the larger the value, the shorter the speed measurement time, higher load, and the result may be inaccurate; The smaller the value, the longer the speed measurement time, lower load, and more accurate results; Adjusting this value can optimize the update time10
speed_test_timeoutSingle interface speed measurement timeout duration, unit seconds (s); The larger the value, the longer the speed measurement time, which can improve the number of interfaces obtained, but the quality will decline; The smaller the value, the shorter the speed measurement time, which can obtain low-latency interfaces with better quality; Adjusting this value can optimize the update time10
speed_test_filter_hostUse Host address for filtering during speed measurement, channels with the same Host address will share speed measurement data, enabling this can significantly reduce the time required for speed measurement, but may lead to inaccurate speed measurement resultsFalse
source_fileTemplate file pathconfig/demo.txt
subscribe_numThe number of preferred subscribe source interfaces in the results10
time_zoneTime zone, can be used to control the time zone displayed by the update time, optional values: Asia/Shanghai or other time zone codesAsia/Shanghai
urls_limitNumber of interfaces per channel10
update_intervalScheduled execution update interval, unit hours, set 0 or empty means run only once, does not apply to workflow12
update_time_positionUpdate time display position, need to enable open_update_time to take effect, optional values: top, bottom, top: display at the top of the result, bottom: display at the bottom of the resulttop

Quick Start

Workflow

Fork this project and initiate workflow updates, detailed steps are available at Detailed Tutorial

Command Line

pip install pipenv
pipenv install --dev

Start update:

pipenv run dev

Start service:

pipenv run service

GUI Software

  1. Download the IPTV-API Update Software, open the software, and click Start to perform the update

  2. Or run the following command in the project directory to open the GUI software:

pipenv run ui
IPTV-API update software

Docker

1. Pull the image

docker pull guovern/iptv-api:latest

🚀 Proxy acceleration (recommended for users in China):

docker pull docker.1ms.run/guovern/iptv-api:latest

2. Run the container

docker run -d -p 8000:8000 guovern/iptv-api
Mount(Recommended):

This allows synchronization of files between the host machine and the container. Modifying templates, configurations, and retrieving updated result files can be directly operated in the host machine's folder.

Taking the host path /etc/docker as an example:

-v /etc/docker/config:/iptv-api/config -v /etc/docker/output:/iptv-api/output
Environment Variables:
VariableDescriptionDefault Value
APP_HOSTService host address"http://localhost"
APP_PORTService port8000

3. Update Results

EndpointDescription
/Default endpoint
/m3um3u format endpoint
/txttxt format endpoint
/ipv4ipv4 default endpoint
/ipv6ipv6 default endpoint
/ipv4/txtipv4 txt endpoint
/ipv6/txtipv6 txt endpoint
/ipv4/m3uipv4 m3u endpoint
/ipv6/m3uipv6 m3u endpoint
/contentEndpoint content
/logSpeed test log
  • RTMP Streaming:

NOTE

  1. To stream local video sources, create a live or hls (recommended) folder in the config directory.
  2. The live folder is used for live streaming interfaces, and the hls folder is used for HLS streaming interfaces.
  3. Place video files named after the channel name into these folders, and the program will automatically stream them to the corresponding channels.
  4. Visit http://localhost:8080/stat to view real-time streaming status statistics.
Streaming EndpointDescription
/livelive streaming endpoint
/hlshls streaming endpoint
/live/txtlive txt streaming endpoint
/hls/txthls txt streaming endpoint
/live/m3ulive m3u streaming endpoint
/hls/m3uhls m3u streaming endpoint
/live/ipv4/txtlive ipv4 txt streaming endpoint
/hls/ipv4/txthls ipv4 txt streaming endpoint
/live/ipv4/m3ulive ipv4 m3u streaming endpoint
/hls/ipv4/m3uhls ipv4 m3u streaming endpoint
/live/ipv6/txtlive ipv6 txt streaming endpoint
/hls/ipv6/txthls ipv6 txt streaming endpoint
/live/ipv6/m3ulive ipv6 m3u streaming endpoint
/hls/ipv6/m3uhls ipv6 m3u streaming endpoint

Changelog

Changelog

Appreciate

Development and maintenance are not easy, please buy me a coffee ~
AlipayWechat
AlipayWechat

Follow

Wechat public account search for Govin, or scan the code to receive updates and learn more tips:

Wechat public account

Star History

Star History Chart

Disclaimer

This project is for learning and communication purposes only. All interface data comes from the internet. If there is any infringement, please contact us for removal.

License

MIT License © 2024-PRESENT Govin

About

📺IPTV电视直播源更新项目『✨秒播级体验🚀』:支持自定义频道与EPG;支持多种源获取方式;支持RTMP推流;支持IPv4/IPv6;支持获取归属地与运营商;每天自动更新两次,结果可用于TVBox等播放软件;支持工作流、Docker(amd64/arm64/arm v7)、命令行、GUI运行方式 | IPTV live

75.36 MiB
4 forks0 stars1 branches0 TagREADMEMIT license
Language
XML77.4%
Python6%
Markdown2.5%
HTML0.2%
Others13.9%