2024-03-26 16:02:56 +08:00
|
|
|
|
# Tutorial
|
|
|
|
|
|
|
|
|
|
|
|
[中文](./tutorial.md) | English
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
IPTV-API is a highly customizable IPTV interface update project 📺, allowing you to customize channel menus,
|
|
|
|
|
|
automatically obtain live sources, and generate available results after speed testing and validation, achieving a 『✨
|
|
|
|
|
|
instant playback experience 🚀』.
|
2025-01-10 15:24:17 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
There are four installation and operation methods in total, choose the one that suits you.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
## Workflow Deployment
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Use GitHub workflow deployment to automatically update the interface.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
### Enter the IPTV-API Project
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Open https://github.com/Guovin/iptv-api and click `Star` to favorite this project (Your Star is my motivation for
|
|
|
|
|
|
continuous updates).
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
### Fork
|
|
|
|
|
|
|
|
|
|
|
|
Copy the source code of this repository to your personal account repository.
|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
1. Name your personal repository as you like (the final live source result link depends on this name), here we use the
|
|
|
|
|
|
default `iptv-api` as an example.
|
|
|
|
|
|
2. Confirm the information is correct and click to create.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
### Update Source Code
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Since this project will continue to iterate and optimize, if you want to get the latest updates, you can do the
|
2024-12-12 16:41:48 +08:00
|
|
|
|
following:
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 1. Watch
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Follow this project, and subsequent update logs will be released as `releases`, and you will receive email
|
|
|
|
|
|
notifications.
|
|
|
|
|
|

|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 2. Sync fork
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
- Normal update:
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Go back to the homepage of your forked repository, if there are updates, click `Sync fork`, `Update branch` to confirm
|
|
|
|
|
|
and update the latest code.
|
|
|
|
|
|

|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
- No `Update branch` button, update conflict:
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
This is because some files conflict with the default files of the main repository, click `Discard commits` to update the
|
|
|
|
|
|
latest code.
|
|
|
|
|
|

|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
### Modify Template
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
When you click to confirm creation in step one, you will automatically jump to your personal repository after success.
|
|
|
|
|
|
At this time, your personal repository has been created, and you can customize your live source channel menu!
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 1. Click the demo.txt template file in the config folder:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
You can copy and refer to the format of the default template for subsequent operations.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 2. Create a personal template user_demo.txt in the config folder:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
1. Click the `config` directory.
|
|
|
|
|
|
2. Create a file.
|
|
|
|
|
|
3. Name the template file `user_demo.txt`.
|
|
|
|
|
|
4. The template file needs to be written in the format of (channel category, #genre#), (channel name, channel interface)
|
|
|
|
|
|
with a comma. If you want to whitelist the interface (no speed test, keep it at the top of the result), you can add
|
|
|
|
|
|
`$!` after the address, such as http://xxx$!. You can also add additional information, such as: http://xxx$!
|
|
|
|
|
|
whitelist.
|
|
|
|
|
|
5. Click `Commit changes...` to save.
|
2024-09-11 17:22:40 +08:00
|
|
|
|
|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
### Modify Configuration
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Like editing templates, modify the runtime configuration.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 1. Click the config.ini configuration file in the config folder:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 2. Copy the default configuration file content:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 3. Create a personal configuration file user_config.ini in the config folder:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
1. Create a file.
|
|
|
|
|
|
2. Name the configuration file `user_config.ini`.
|
2025-03-13 17:02:39 +08:00
|
|
|
|
3. Paste the default configuration. (when creating `user_config.ini`, you can only enter the configuration items you
|
|
|
|
|
|
want to modify, no need to copy the entire `config.ini`. Note that the `[Settings]` at the top of the configuration
|
|
|
|
|
|
file must be retained, otherwise the custom configuration below will not take effect)
|
2024-10-08 14:42:06 +08:00
|
|
|
|
4. Modify the template and result file configuration:
|
2024-12-12 16:41:48 +08:00
|
|
|
|
- source_file = config/user_demo.txt
|
|
|
|
|
|
- final_file = output/user_result.txt
|
2025-01-10 17:01:45 +08:00
|
|
|
|
5. Click `Commit changes...` to save.
|
2024-09-11 17:22:40 +08:00
|
|
|
|
|
|
|
|
|
|

|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Adjust the configuration as needed, here is the default configuration description:
|
|
|
|
|
|
[Configuration parameters](./config.md)
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> [!NOTE]
|
|
|
|
|
|
> 1. For enabling interface information display, since some players (such as `PotPlayer`) do not support parsing
|
|
|
|
|
|
interface
|
|
|
|
|
|
supplementary information, causing playback failure, you can modify the configuration: `open_url_info = False` (
|
|
|
|
|
|
GUI:
|
|
|
|
|
|
uncheck display interface information) to disable this feature.
|
2025-04-15 15:10:20 +08:00
|
|
|
|
> 2. If your network supports IPv6, you can modify the configuration: `ipv6_support = True` (GUI: Check
|
|
|
|
|
|
`Force assume the current network supports IPv6`) to skip the support check.
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> 3. Enabling keyword search (disabled by default) will significantly increase the update time, not recommended to
|
|
|
|
|
|
enable.
|
2024-07-10 10:31:44 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### Similarly, you can customize subscription sources, blacklists, and whitelists (it is recommended to copy files and rename them with the
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
`user_` prefix).
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-21 17:32:46 +08:00
|
|
|
|
- Subscription sources (`config/subscribe.txt`)
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Supports txt and m3u addresses as subscriptions, the program will read the channel interface data in sequence.
|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-21 17:32:46 +08:00
|
|
|
|
|
|
|
|
|
|
- Local sources(`config/local.txt`)
|
|
|
|
|
|
|
|
|
|
|
|
The channel interface data comes from local files, and the program will read the channel interface data in sequence.
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 16:02:57 +08:00
|
|
|
|
- EPG Source (`config/epg.txt`)
|
|
|
|
|
|
|
|
|
|
|
|
The source of program guide information. The program will sequentially fetch the program guide data from the
|
|
|
|
|
|
subscription addresses in the file and aggregate the output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Channel Aliases (`config/alias.txt`)
|
|
|
|
|
|
|
|
|
|
|
|
A list of aliases for channel names, used to map multiple names to a single name when fetching from the interface,
|
|
|
|
|
|
improving the fetch volume and accuracy. Format: TemplateChannelName,Alias1,Alias2,Alias3
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-21 17:32:46 +08:00
|
|
|
|
- Blacklist (`config/blacklist.txt`)
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Interfaces that match the blacklist keywords will be filtered and not collected, such as low-quality interfaces with
|
|
|
|
|
|
ads.
|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-21 17:32:46 +08:00
|
|
|
|
|
|
|
|
|
|
- Whitelist (`config/whitelist.txt`)
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Interfaces or subscription sources in the whitelist will not participate in speed testing and will be prioritized at
|
|
|
|
|
|
the top of the results. Fill in the channel name to directly retain the record in the final result, such as: CCTV-1,
|
|
|
|
|
|
interface address, only filling in the interface address will apply to all channels, multiple records are entered on
|
|
|
|
|
|
separate lines.
|
|
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-21 17:32:46 +08:00
|
|
|
|
|
|
|
|
|
|
- Multicast data (`config/rtp`)
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
In addition, you can also maintain multicast source data yourself, the files are located in the config/rtp directory,
|
|
|
|
|
|
and the file naming format is: `region_operator.txt`.
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
### Run Update
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
If your template and configuration modifications are correct, you can configure `Actions` to achieve automatic updates.
|
|
|
|
|
|
|
|
|
|
|
|
#### 1. Enter Actions:
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
#### 2. Enable Actions workflow:
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
Since the Actions workflow of the forked repository is disabled by default, you need to manually confirm to enable it,
|
|
|
|
|
|
click the button in the red box to confirm enabling.
|
2024-03-26 16:02:56 +08:00
|
|
|
|

|
2025-01-10 17:01:45 +08:00
|
|
|
|
After enabling successfully, you can see that there are no workflows running currently, don't worry, let's start running
|
|
|
|
|
|
your first update workflow below.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 3. Run the update workflow:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
##### (1) Enable update schedule:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
1. Click `update schedule` under the `Workflows` category.
|
|
|
|
|
|
2. Since the workflow of the forked repository is disabled by default, click the `Enable workflow` button to confirm the
|
2024-12-12 16:41:48 +08:00
|
|
|
|
activation.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2024-09-11 17:22:40 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
##### (2) Run the Workflow based on branches:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Now you can run the update workflow.
|
|
|
|
|
|
|
|
|
|
|
|
1. Click `Run workflow`.
|
|
|
|
|
|
2. Here you can switch to the branch you want to run. Since the fork defaults to the `master` branch, if the template
|
|
|
|
|
|
and configuration you modified are also in the `master` branch, just choose `master` here, and click `Run workflow`
|
|
|
|
|
|
to confirm the run.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2024-09-11 17:22:40 +08:00
|
|
|
|

|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
##### (3) Workflow in progress:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
|
|
|
|
|
Wait a moment, and you will see that your first update workflow is running!
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> [!NOTE]\
|
|
|
|
|
|
> The running time depends on the number of channels and pages in your template and other configurations, and also
|
|
|
|
|
|
> largely depends on the current network conditions. Please be patient. The default template and configuration usually
|
|
|
|
|
|
> take about 15 minutes.
|
2024-09-11 17:22:40 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
##### (4) Cancel the running Workflow:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
If you feel that this update is not quite right and you need to modify the template or configuration before running
|
2025-01-10 17:01:45 +08:00
|
|
|
|
again, you can click `Cancel run` to cancel this run.
|
2024-09-11 17:22:40 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
##### (5) Workflow executed successfully:
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
If everything is normal, after a short wait, you will see that the workflow has been executed successfully (green check
|
|
|
|
|
|
mark).
|
2024-03-26 16:02:56 +08:00
|
|
|
|

|
2024-09-11 17:22:40 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
At this point, you can visit the file link to see if the latest results have been synchronized:
|
2025-02-06 10:11:45 +08:00
|
|
|
|
https://raw.githubusercontent.com/your\_github\_username/repository\_name (corresponding to the TV
|
2025-01-15 14:57:02 +08:00
|
|
|
|
created when forking)
|
2025-01-10 17:01:45 +08:00
|
|
|
|
/master/output/user\_result.txt
|
|
|
|
|
|
|
|
|
|
|
|
Or proxy address:
|
|
|
|
|
|
https://cdn.jsdelivr.net/gh/your\_github\_username/repository\_name (corresponding to the TV created when forking)
|
|
|
|
|
|
@master/output/user\_result.txt
|
2025-01-21 17:32:46 +08:00
|
|
|
|
|
2024-09-11 17:22:40 +08:00
|
|
|
|

|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
If you can access this link and it returns the updated interface content, then your live source interface link has been
|
2025-01-10 17:01:45 +08:00
|
|
|
|
successfully created! Simply copy and paste this link into software like `TVBox` in the configuration field to use~
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> [!NOTE]\
|
|
|
|
|
|
> Except for the first execution of the workflow, which requires you to manually trigger it, subsequent
|
|
|
|
|
|
> executions (default: 6:00 AM and 18:00 PM Beijing time daily) will be automatically triggered. If you have modified
|
|
|
|
|
|
> the template or configuration files and want to execute the update immediately, you can manually trigger (2)
|
|
|
|
|
|
`Run workflow`.
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
#### 4. Modify Workflow Update Frequency (optional)
|
2024-03-26 16:02:56 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
If you want to modify the update frequency (default: 6:00 AM and 18:00 PM Beijing time daily), you can modify the
|
|
|
|
|
|
`on: schedule: - cron` field:
|
2024-03-26 16:02:56 +08:00
|
|
|
|

|
2025-01-21 17:32:46 +08:00
|
|
|
|
|
2024-09-11 17:22:40 +08:00
|
|
|
|
If you want to perform updates every 2 days, you can modify it like this:
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
2024-11-28 16:38:09 +08:00
|
|
|
|
- cron: '0 22 */2 * *'
|
2024-11-29 13:40:43 +08:00
|
|
|
|
- cron: '0 10 */2 * *'
|
2025-04-08 15:09:33 +08:00
|
|
|
|
```
|
2024-04-08 11:53:36 +08:00
|
|
|
|
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> [!WARNING]
|
|
|
|
|
|
> 1. It is strongly recommended not to set the update frequency too high, as there is no significant difference in
|
|
|
|
|
|
interface content over a short period. High update frequency and long-running workflows may be considered resource
|
|
|
|
|
|
abuse, leading to the risk of repository and account suspension.
|
|
|
|
|
|
> 2. Please monitor the runtime of your workflows. If you find the execution time too long, reduce the number of
|
|
|
|
|
|
channels in the template, adjust the pagination and interface count in the configuration to comply with runtime
|
|
|
|
|
|
requirements.
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
## Command Line
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
|
|
|
|
|
1. Install Python
|
2025-04-08 15:09:33 +08:00
|
|
|
|
Please download and install Python from the official website, and select the option to add Python to the system
|
|
|
|
|
|
environment variable Path during installation.
|
2025-01-10 17:01:45 +08:00
|
|
|
|
|
|
|
|
|
|
2. Run the update
|
|
|
|
|
|
Open the terminal CMD in the project directory and run the following commands in sequence:
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Install dependencies:
|
2024-11-22 18:30:08 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
```shell
|
2024-11-05 14:16:36 +08:00
|
|
|
|
pip install pipenv
|
2024-11-22 18:30:08 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
```shell
|
2024-11-22 18:30:08 +08:00
|
|
|
|
pipenv install --dev
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Start the update:
|
2024-11-27 16:57:12 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
```shell
|
2024-11-18 10:58:00 +08:00
|
|
|
|
pipenv run dev
|
2024-10-08 14:42:06 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
Start the service:
|
2024-11-27 16:57:12 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
```shell
|
2024-11-27 16:57:12 +08:00
|
|
|
|
pipenv run service
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-10 17:04:34 +08:00
|
|
|
|
## GUI Software
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-05-21 16:50:07 +08:00
|
|
|
|
1. Download the [IPTV-API Update Software](https://github.com/Guovin/iptv-api/releases), open the software, and click
|
|
|
|
|
|
Start to perform the update.
|
2024-04-19 16:14:30 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
2. Or run the following command in the project directory to open the GUI software:
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2024-12-12 16:41:48 +08:00
|
|
|
|
```shell
|
2024-10-08 14:42:06 +08:00
|
|
|
|
pipenv run ui
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|

|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-03-13 17:02:39 +08:00
|
|
|
|
If you do not understand the software configuration options, do not change anything, just click start.
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-01-10 17:01:45 +08:00
|
|
|
|
## Docker
|
2024-11-22 18:30:08 +08:00
|
|
|
|
|
2025-01-21 17:53:46 +08:00
|
|
|
|
### 1. Pull the image
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2024-11-22 18:30:08 +08:00
|
|
|
|
```bash
|
2024-11-28 16:03:01 +08:00
|
|
|
|
docker pull guovern/iptv-api:latest
|
2024-11-22 18:30:08 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-15 15:17:33 +08:00
|
|
|
|
🚀 Proxy acceleration (recommended for users in China):
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
docker pull docker.1ms.run/guovern/iptv-api:latest
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-21 17:53:46 +08:00
|
|
|
|
### 2. Run the container
|
2024-11-22 18:30:08 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2024-11-28 16:03:01 +08:00
|
|
|
|
docker run -d -p 8000:8000 guovern/iptv-api
|
2024-11-22 18:30:08 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2025-01-21 17:09:34 +08:00
|
|
|
|
#### Mount (recommended):
|
2025-01-10 17:01:45 +08:00
|
|
|
|
|
2025-04-02 15:35:17 +08:00
|
|
|
|
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.
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-04-02 15:35:17 +08:00
|
|
|
|
Taking the host path /etc/docker as an example:
|
2024-11-22 18:30:08 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-01-21 17:53:46 +08:00
|
|
|
|
-v /etc/docker/config:/iptv-api/config
|
|
|
|
|
|
-v /etc/docker/output:/iptv-api/output
|
2024-11-22 18:30:08 +08:00
|
|
|
|
```
|
2024-10-08 14:42:06 +08:00
|
|
|
|
|
2025-04-08 15:09:33 +08:00
|
|
|
|
> [!WARNING]\
|
|
|
|
|
|
> If you pull the image again to update the version, and there are changes or additions to the configuration files, be
|
|
|
|
|
|
> sure to overwrite the old configuration files in the host (config directory), as the host configuration files cannot
|
|
|
|
|
|
> be
|
|
|
|
|
|
> updated automatically. Otherwise, the container will still run with the old configuration.
|
2025-01-10 17:01:45 +08:00
|
|
|
|
|
2025-01-21 17:09:34 +08:00
|
|
|
|
#### Environment Variables:
|
|
|
|
|
|
|
2025-05-23 16:14:57 +08:00
|
|
|
|
| Variable | Description | Default Value |
|
|
|
|
|
|
|:---------|:---------------------|:-------------------|
|
|
|
|
|
|
| APP_HOST | Service host address | "http://localhost" |
|
|
|
|
|
|
| APP_PORT | Service port | 8000 |
|
2025-04-02 15:35:17 +08:00
|
|
|
|
|
|
|
|
|
|
### 3. Update Results
|
|
|
|
|
|
|
2025-08-15 13:49:15 +08:00
|
|
|
|
| Endpoint | Description |
|
|
|
|
|
|
|:----------------|:------------------------------------------------|
|
|
|
|
|
|
| / | Default endpoint |
|
|
|
|
|
|
| /m3u | m3u format endpoint |
|
|
|
|
|
|
| /txt | txt format endpoint |
|
|
|
|
|
|
| /ipv4 | ipv4 default endpoint |
|
|
|
|
|
|
| /ipv6 | ipv6 default endpoint |
|
|
|
|
|
|
| /ipv4/txt | ipv4 txt endpoint |
|
|
|
|
|
|
| /ipv6/txt | ipv6 txt endpoint |
|
|
|
|
|
|
| /ipv4/m3u | ipv4 m3u endpoint |
|
|
|
|
|
|
| /ipv6/m3u | ipv6 m3u endpoint |
|
|
|
|
|
|
| /content | Endpoint content |
|
|
|
|
|
|
| /log/result | Log of valid results |
|
|
|
|
|
|
| /log/speed-test | Log of all interfaces involved in speed testing |
|
2025-10-13 17:16:02 +08:00
|
|
|
|
| /log/statistic | Log of statistics results |
|
|
|
|
|
|
| /log/nomatch | Log of unmatched channels |
|
2025-04-02 15:35:17 +08:00
|
|
|
|
|
|
|
|
|
|
- RTMP Streaming:
|
|
|
|
|
|
|
2025-04-08 15:16:33 +08:00
|
|
|
|
> [!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.
|
2025-04-08 15:09:33 +08:00
|
|
|
|
|
2025-04-02 15:35:17 +08:00
|
|
|
|
| Streaming Endpoint | Description |
|
|
|
|
|
|
|:-------------------|:---------------------------------|
|
|
|
|
|
|
| /live | live streaming endpoint |
|
|
|
|
|
|
| /hls | hls streaming endpoint |
|
|
|
|
|
|
| /live/txt | live txt streaming endpoint |
|
|
|
|
|
|
| /hls/txt | hls txt streaming endpoint |
|
|
|
|
|
|
| /live/m3u | live m3u streaming endpoint |
|
|
|
|
|
|
| /hls/m3u | hls m3u streaming endpoint |
|
|
|
|
|
|
| /live/ipv4/txt | live ipv4 txt streaming endpoint |
|
|
|
|
|
|
| /hls/ipv4/txt | hls ipv4 txt streaming endpoint |
|
|
|
|
|
|
| /live/ipv4/m3u | live ipv4 m3u streaming endpoint |
|
|
|
|
|
|
| /hls/ipv4/m3u | hls ipv4 m3u streaming endpoint |
|
|
|
|
|
|
| /live/ipv6/txt | live ipv6 txt streaming endpoint |
|
|
|
|
|
|
| /hls/ipv6/txt | hls ipv6 txt streaming endpoint |
|
|
|
|
|
|
| /live/ipv6/m3u | live ipv6 m3u streaming endpoint |
|
|
|
|
|
|
| /hls/ipv6/m3u | hls ipv6 m3u streaming endpoint |
|