IPTV-Restream

antebrlMIT更新放缓

把 IPTV 的 m3u 播放列表转成 HLS 重新分发,并让多人同步观看同一频道,适合自建电视直播和一起看场景。

A simple web application that can restream and synchonize IPTV streams using HLS & ffmpeg.

v2发布于 2024-12-23 02:43 UTC309star71fork同步于 2026-11-07 07:34 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/antebrl/IPTV-Restream.git
docker compose up -d
硬件要求按 README 说明

README 未说明具体硬件要求;Docker 部署方式下由 ffmpeg 转流,README 未给出显存或 CPU 规格。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 IPTV 播放列表变成可共享的网页播放器,支持转流、代理和多人同步观看

把 IPTV 的 m3u 播放列表转成 HLS 重新分发,并让多人同步观看同一频道,适合自建电视直播和一起看场景。

核心能力

  • 用 ffmpeg 缓存源流并转流,绕过设备数限制
  • 后端代理所有请求,解决 CORS 并隐藏真实流地址
  • 多端同步选台与播放,实现 Watch2Gether 式观看
  • 支持同时加载多个播放列表并在频道间切换
  • 暴露 m3u 播放列表,可在 VLC 或电视等其他播放器使用

容易踩的坑

默认映射 80 端口,被占用时需改成 8080:80 之类的映射;频道播不了时需在 direct、proxy、restream 三种模式间切换,proxy 最常用;Xtream Codes 播放列表需在 URL 加 &type=m3u_plus&output=hls 或 output=ts;外部播放器用的播放列表若失效,需在 docker-compose.yml 里设置正确的 BACKEND_URL。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v2
  1. v2Major Improvements & Bug Fixes [v2]最新正式版2024-12-23 · 2024-12-23 02:43 UTC

    See the milestone

    What's Changed

    Full Changelog: https://github.com/antebrl/IPTV-Restream/compare/v0.1.0...v2

    Publishes

    ghcr.io/antebrl/iptv-restream/nginx:v2

  2. v0.1.0MVP [v1]2024-12-02 · 2024-12-02 09:08 UTC
    查看更新说明

    Minimum Viable Product (MVP) [v1]

    See the Milestone.

    What's Changed

    New Contributors

    Full Changelog: https://github.com/antebrl/IPTV-Restream/commits/v0.1

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    IPTV StreamHub

    A simple IPTV restream and synchronization (watch2gether) application with web frontend. Share your iptv playlist and watch it together with your friends.

    💡Use Cases

    • IPTV Web player supporting multiple playlists at once.
    • Connect with multiple Devices to 1 IPTV Stream, if your provider limits current streaming devices (restream mode).
    • Proxy all Requests through one IP (proxy and restream mode).
      • Helps with CORS issues.
    • Synchronize IPTV streaming with multiple devices: Synchronized playback and channel selection for perfect Watch2Gether.
    • Share your iptv access without revealing your actual stream-url (privacy-mode) and watch together with your friends.

    ✨ Features

    IPTV Player - IPTV web player with support for any other iptv players by exposing the playlist. Restream / Proxy - Proxy your iptv streams through the backend. Synchronization - The selection and playback of the stream is perfectly synchronized for all viewers. Channels - Add multiple iptv streams and playlists, you can switch between. Live chat - chat with other viewers with a randomized profile.

    🚀 Run

    Run with Docker (Preferred)

    Clone the repo

    git clone https://github.com/antebrl/IPTV-Restream.git
    

    Make sure to have docker up & running. Start with docker compose

    docker compose up -d
    

    Open http://localhost

    [!IMPORTANT]
    If a channel/playlist won't work, please try with proxy or restream mode. This fixes most of the problems! See also Channel Mode.

    If you're using an Xtream Codes playlist (format: /get.php?username=xxx&password=xxx&type=xxx&output=xxx), try the following options:

    • Use proxy mode with HLS output: Use &type=m3u_plus&output=hls in your playlist URL.
    • Use restream mode with MPEG-TS output: Use &type=m3u_plus&output=ts to your playlist URL.

    If your playlist is a plain HTTP link or has CORS issues, you must use proxy or restream mode to ensure compatibility in the web.

    There is also documentation for ADVANCED DEPLOYMENT:

    • Configuration options (Admin mode).
    • Deploy from container registry and without cloning and building.
    • Deploy together with nginx proxy manager for automatic ssl handling.

    🆓 Free compatible playlists

    These are some tested playlists as an example. Use your own iptv playlist for the best quality!

    • Free TV Channels: Huge collection of free tv-channels. One playlist for every country.

    🖼️ Preview

    Frontend Preview Add channel

    ⚙️ Settings

    Channel Mode

    Direct

    Directly uses the source stream. Won't work with most of the streams, because of CORS, IP/Device restrictions. Is also incompatible with custom headers and privacy mode.

    Proxy (Preffered)

    The stream requests are proxied through the backend. Allows to set custom headers and bypass CORS. This mode is preffered. Only switch to restream mode, if proxy mode won't work for your stream or if you have synchronization issues.

    Restream

    The backend service caches the source stream (with ffmpeg) and restreams it. Can help with hard device restrictions of your provider or synchroization problems (when your iptv channels have no programDateTime). But it can lead to longer initial loading times and performance issues after time.

    FAQ & Common Mistakes

    Which streaming mode should I choose for the channel?

    Generally: You should try with direct mode first, switch to proxy mode if it doesn't work and switch to restream mode if this also doesn't work.

    Proxy mode is most likely the mode, you will use! You will need restream mode especially when your iptv playlist has no programDateTime set and you want to have playback synchronization.


    How can I use the channels on any other iptv player (e.g. on TV)?

    Please click on the 📺 (TV-button) in the top-right in the frontend. There you'll find the playlist you have to use in any other iptv player. This playlist contains all your channels and one CURRENT_CHANNEL, which forwards the content of the currently played channel. If this playlist does not work, please check if the base-url of the channels in the playlist is correct and set the BACKEND_URL in the docker-compose.yml if not.


    My playlist only supports xtream codes api!

    IPTV playlist browser allows you to export a m3u playlist from your xtream codes account, and let's you select single channels or the whole playlist. Official xstreams-code integration is planned!


    Error: Bind for 0.0.0.0:80 failed: port is already allocated

    To fix this, change the port mapping in the docker-compose to X:80 e.g. 8080:80. Make also sure that port X is open in the firewall configuration if you want to expose the application.


    Is it possible to run components seperately, if I only need the frontend OR backend?

    If you only need the restream functionality and want to use another iptv player (e.g. VLC), you may only run the backend. If you only need the synchronization functionality, you may only run the frontend.

    Be aware, that this'll require additional configuration/adaption and won't be officially supported. It is recommended to run the whole project as once.


    Is there a option to limit access of channel management?

    Yes, you can enable Admin Mode in the configuration to restrict channel management to authenticated administrators only.

    Contribute & Contact

    Feel free to open discussions and issues for any type of requests. Don't hesitate to contact me, if you have any problems with the setup.

    If you like the project and want to support future development, please leave a ⭐. Stargazers repo roster for @antebrl/IPTV-Restream